@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --cp-bg: #eef4fb;
    --cp-surface: #ffffff;
    --cp-surface-soft: #f8fafc;
    --cp-text: #0f172a;
    --cp-muted: #64748b;
    --cp-border: rgba(148, 163, 184, .28);
    --cp-primary: #0f766e;
    --cp-primary-dark: #115e59;
    --cp-accent: #2563eb;
    --cp-warn: #f59e0b;
    --cp-danger: #dc2626;
    --cp-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --cp-radius-xl: 28px;
    --cp-radius-lg: 22px;
    --cp-radius-md: 16px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    color: var(--cp-text);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .15), transparent 30rem),
        radial-gradient(circle at bottom left, rgba(15, 118, 110, .14), transparent 28rem),
        var(--cp-bg);
}

button, input { font: inherit; }

a { color: inherit; text-decoration: none; }

.customer-portal-login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.cp-login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    gap: 22px;
    align-items: stretch;
}

.cp-login-hero,
.cp-login-card,
.cp-hero-card,
.cp-panel,
.cp-stat-card {
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
}

.cp-login-hero {
    min-height: 620px;
    border-radius: 34px;
    padding: clamp(28px, 5vw, 64px);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .24), rgba(15, 118, 110, .88)),
        linear-gradient(135deg, #0f172a, #0f766e 55%, #2563eb);
}

.cp-login-hero::before {
    content: '';
    position: absolute;
    inset: 42px 42px auto auto;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 34px solid rgba(255, 255, 255, .12);
}

.cp-login-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.35;
    max-width: 760px;
}

.cp-login-hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, .86);
    font-size: 17px;
    line-height: 2;
}

.cp-login-badge {
    width: fit-content;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .9);
}

.cp-login-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.cp-login-feature-grid span {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
}

.cp-login-card {
    border-radius: 34px;
    padding: clamp(22px, 4vw, 42px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cp-login-title,
.cp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cp-brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-accent));
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .22);
}

.cp-login-title h2 {
    margin: 0 0 5px;
    font-size: 25px;
}

.cp-login-title p,
.cp-login-note,
.cp-field small,
.cp-check-row,
.cp-muted {
    color: var(--cp-muted);
}

.cp-login-title p { margin: 0; line-height: 1.8; }

.cp-field {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.cp-field span {
    color: #334155;
    font-size: 14px;
}

.cp-field input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--cp-border);
    border-radius: 16px;
    background: #fff;
    color: var(--cp-text);
    padding: 0 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cp-field input:focus {
    border-color: rgba(15, 118, 110, .65);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .1);
}

.cp-check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    font-size: 14px;
}

.cp-primary-btn,
.cp-primary-link {
    border: 0;
    cursor: pointer;
    border-radius: 17px;
    min-height: 50px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-accent));
    box-shadow: 0 14px 28px rgba(37, 99, 235, .18);
    font-weight: 800;
}

.cp-login-note {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: var(--cp-surface-soft);
    font-size: 13px;
    line-height: 1.8;
}

.cp-validation {
    margin-top: 18px;
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 10px 12px;
}

.cp-validation:empty { display: none; }

.cp-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
}

.cp-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: #fff;
    background: linear-gradient(180deg, #0f172a, #113f3c 58%, #0f766e);
}

.cp-brand {
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .08);
}

.cp-brand strong,
.cp-brand small {
    display: block;
}

.cp-brand small { opacity: .72; margin-top: 4px; }

.cp-nav {
    display: grid;
    gap: 8px;
}

.cp-nav a {
    padding: 13px 15px;
    border-radius: 16px;
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
}

.cp-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.cp-sidebar-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255, 255, 255, .74);
    font-size: 12px;
}

.cp-main {
    min-width: 0;
    padding: 22px;
}

.cp-topbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.cp-topbar h1 {
    margin: 6px 0 0;
    font-size: clamp(23px, 3vw, 34px);
}

.cp-eyebrow {
    display: inline-flex;
    color: var(--cp-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
}

.cp-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid var(--cp-border);
}

.cp-user-box span {
    padding-inline-start: 12px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-user-box button {
    border: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    min-height: 38px;
    padding: 0 15px;
    cursor: pointer;
}

.cp-hero-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border-radius: var(--cp-radius-xl);
    padding: clamp(22px, 4vw, 36px);
    margin-bottom: 18px;
}

.cp-hero-content h2 {
    margin: 8px 0 8px;
    font-size: clamp(26px, 4vw, 44px);
}

.cp-hero-content p {
    margin: 0;
    color: var(--cp-muted);
    line-height: 2;
}

.cp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cp-hero-meta span,
.cp-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
    font-size: 13px;
}

.cp-hero-avatar {
    width: 92px;
    height: 92px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    font-size: 34px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-accent));
}

.cp-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cp-stats-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cp-stat-card {
    border-radius: var(--cp-radius-lg);
    padding: 20px;
    display: grid;
    gap: 8px;
}

.cp-stat-card span { color: var(--cp-muted); }

.cp-stat-card strong {
    font-size: 32px;
    line-height: 1;
}

.cp-stat-card small { color: var(--cp-muted); line-height: 1.7; }

.cp-stat-ticket {
    background: linear-gradient(135deg, rgba(15, 118, 110, .98), rgba(37, 99, 235, .9));
    color: #fff;
}

.cp-stat-ticket span,
.cp-stat-ticket small { color: rgba(255, 255, 255, .82); }

.cp-content-grid {
    display: grid;
    grid-template-columns: 1.35fr .85fr;
    gap: 16px;
    align-items: start;
}

.cp-panel {
    border-radius: var(--cp-radius-lg);
    padding: 20px;
    min-width: 0;
}

.cp-panel-large { grid-row: span 2; }

.cp-panel-title,
.cp-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cp-panel-title h3,
.cp-page-head h2 {
    margin: 4px 0 0;
}

.cp-panel-title a {
    color: var(--cp-primary);
    font-weight: 800;
}

.cp-page-head {
    padding: 22px;
    border-radius: var(--cp-radius-xl);
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
}

.cp-page-head p { margin: 8px 0 0; color: var(--cp-muted); line-height: 2; }

.cp-ticket-list,
.cp-mini-list,
.cp-timeline {
    display: grid;
    gap: 12px;
}

.cp-ticket-row,
.cp-mini-list div,
.cp-timeline-item,
.cp-ticket-card {
    border: 1px solid var(--cp-border);
    background: var(--cp-surface-soft);
    border-radius: 18px;
}

.cp-ticket-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
}

.cp-ticket-row strong,
.cp-mini-list strong,
.cp-timeline-item b { display: block; margin-bottom: 6px; }

.cp-ticket-row span,
.cp-ticket-row b,
.cp-mini-list span,
.cp-timeline-item span,
.cp-timeline-item small,
.cp-ticket-meta,
.cp-ticket-card p {
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.8;
}

.cp-ticket-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.cp-ticket-main { min-width: 0; }

.cp-ticket-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cp-ticket-title-row h4 {
    margin: 0;
    font-size: 18px;
}

.cp-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.cp-ticket-side {
    min-width: 86px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    align-content: center;
    background: #eff6ff;
    color: #1d4ed8;
}

.cp-ticket-side strong { font-size: 28px; }
.cp-ticket-side span { font-size: 12px; }

.cp-mini-list div,
.cp-timeline-item { padding: 13px; }

.cp-empty-state {
    padding: 20px;
    border-radius: 18px;
    background: var(--cp-surface-soft);
    color: var(--cp-muted);
    text-align: center;
    border: 1px dashed var(--cp-border);
}

.cp-empty-state.large { padding: 42px 20px; }

.cp-coming-soon {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.cp-coming-soon strong { font-size: 20px; }
.cp-coming-soon p { color: var(--cp-muted); line-height: 2; margin: 0; }
.cp-coming-soon a { color: var(--cp-primary); font-weight: 900; }

@media (max-width: 1050px) {
    .cp-shell { grid-template-columns: 1fr; }
    .cp-sidebar {
        position: relative;
        height: auto;
        border-radius: 0 0 28px 28px;
    }
    .cp-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cp-content-grid { grid-template-columns: 1fr; }
    .cp-panel-large { grid-row: auto; }
}

@media (max-width: 860px) {
    .customer-portal-login-body { padding: 12px; }
    .cp-login-shell { grid-template-columns: 1fr; }
    .cp-login-hero { min-height: auto; padding: 30px; }
    .cp-stats-grid,
    .cp-stats-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-topbar,
    .cp-hero-card,
    .cp-page-head,
    .cp-ticket-card { align-items: stretch; flex-direction: column; }
    .cp-hero-avatar { width: 76px; height: 76px; border-radius: 24px; }
}

@media (max-width: 620px) {
    .cp-main { padding: 14px; }
    .cp-sidebar { padding: 14px; }
    .cp-nav { grid-template-columns: 1fr 1fr; }
    .cp-stats-grid,
    .cp-stats-grid.two { grid-template-columns: 1fr; }
    .cp-login-feature-grid { grid-template-columns: 1fr; }
    .cp-user-box { width: 100%; justify-content: space-between; border-radius: 18px; }
    .cp-ticket-row { flex-direction: column; }
}

/* Phase 91 - customer ticket workflow */
.cp-alert{border-radius:18px;padding:12px 14px;font-weight:800;margin-bottom:14px}.cp-alert.success{background:#dcfce7;color:#166534}.cp-alert.danger{background:#fee2e2;color:#991b1b}.cp-secondary-link,.cp-inline-action{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:900;background:#e2e8f0;color:#0f172a}.cp-inline-action{margin-inline-start:10px;background:#eff6ff;color:#1d4ed8}.cp-form-shell{max-width:940px}.cp-form-card{border:1px solid rgba(15,23,42,.08);border-radius:26px;background:#fff;box-shadow:0 16px 44px rgba(15,23,42,.06);padding:18px;display:grid;gap:14px}.cp-form-card.compact{padding:0;border:0;box-shadow:none}.cp-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cp-field{display:grid;gap:8px}.cp-field span{font-weight:900;color:#0f172a}.cp-field input,.cp-field select,.cp-field textarea{border:1px solid #dbe3ef;border-radius:16px;padding:12px 14px;font-family:inherit;background:#fff;color:#0f172a;outline:none}.cp-field textarea{resize:vertical;line-height:2}.cp-field input:focus,.cp-field select:focus,.cp-field textarea:focus{border-color:#60a5fa;box-shadow:0 0 0 4px rgba(59,130,246,.12)}.cp-field small,.cp-validation{color:#dc2626;font-size:12px}.cp-form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cp-form-actions button{border:0;border-radius:16px;padding:12px 18px;font-family:inherit;font-weight:900;background:#0f172a;color:#fff;cursor:pointer}.cp-form-actions a{text-decoration:none;color:#475569;font-weight:800}.cp-ticket-detail-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.65fr);gap:16px}.cp-thread{display:grid;gap:12px}.cp-message{border:1px solid #e2e8f0;border-radius:20px;padding:14px 15px;background:#f8fafc}.cp-message.customer{background:#fff7ed;border-color:#fed7aa}.cp-message.admin{background:#eff6ff;border-color:#bfdbfe}.cp-message-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.cp-message-head strong{color:#0f172a}.cp-message-head span{color:#64748b;font-size:12px}.cp-message p{white-space:pre-wrap;line-height:2;margin:0;color:#334155}.cp-reply-panel{height:max-content}.cp-ticket-side a{margin-top:8px;border-radius:999px;background:#0f172a;color:#fff;text-decoration:none;padding:7px 12px;font-weight:900;font-size:12px}
@media(max-width:860px){.cp-form-row,.cp-ticket-detail-grid{grid-template-columns:1fr}.cp-form-actions button,.cp-form-actions a,.cp-secondary-link,.cp-primary-link{width:100%}}
.cp-panel-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cp-panel-actions a,.cp-ticket-row>a{border-radius:999px;background:#eff6ff;color:#1d4ed8;text-decoration:none;padding:7px 11px;font-weight:900;font-size:12px}.cp-ticket-row>a{background:#0f172a;color:#fff}

/* Phase 93: dynamic customer portal modules */
.cp-modules-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.cp-module-card{position:relative;display:grid;gap:8px;text-decoration:none;color:#0f172a;background:rgba(255,255,255,.9);border:1px solid rgba(148,163,184,.24);border-radius:22px;padding:16px;box-shadow:0 14px 34px rgba(15,23,42,.07);transition:transform .18s ease,border-color .18s ease}.cp-module-card:hover{transform:translateY(-2px);border-color:#93c5fd}.cp-module-card strong{font-size:16px}.cp-module-card small{color:#64748b;line-height:1.8}.cp-module-card b{position:absolute;left:14px;top:14px;min-width:30px;height:30px;border-radius:999px;background:#eff6ff;color:#1d4ed8;display:grid;place-items:center;font-size:13px}.cp-module-icon{width:42px;height:42px;border-radius:16px;background:linear-gradient(135deg,#eff6ff,#f8fafc);display:grid;place-items:center;font-size:22px}.cp-section-hero{display:flex;gap:16px;align-items:center;border:1px solid rgba(148,163,184,.24);border-radius:26px;background:linear-gradient(135deg,#f8fbff,#fff);padding:22px;margin-bottom:18px;box-shadow:0 18px 42px rgba(15,23,42,.06)}.cp-section-hero h2{margin:4px 0 6px;font-size:24px}.cp-section-hero p{margin:0;color:#64748b;line-height:2}.cp-soft-note{background:#f8fafc}.cp-soft-note h3{margin:0 0 8px}.cp-soft-note p{margin:0;color:#475569;line-height:2}.cp-alert{border-radius:18px;padding:13px 15px;margin-bottom:16px;font-weight:800;line-height:1.8}.cp-alert-success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.cp-alert-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.cp-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.cp-primary-link,.cp-secondary-link{border-radius:14px;padding:10px 14px;text-decoration:none;font-weight:900}.cp-primary-link{background:#0f172a;color:#fff}.cp-secondary-link{background:#eff6ff;color:#1d4ed8}.cp-sidebar-footer span{display:block}
@media(max-width:1100px){.cp-modules-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.cp-modules-grid{grid-template-columns:1fr}.cp-section-hero{align-items:flex-start}.cp-module-card b{position:static;width:max-content;padding:0 10px}.cp-hero-actions a{width:100%;text-align:center}}

/* Phase 95: refined portal auth and record details */
.portal-auth-refined{background:linear-gradient(135deg,#eef6ff,#f8fafc 44%,#ecfdf5)}
.cp-login-shell-photo{grid-template-columns:minmax(0,1.08fr) minmax(380px,.92fr);max-width:1180px}
.cp-login-hero-photo{padding:0;background:#0f172a;isolation:isolate;min-height:650px}
.cp-auth-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;filter:saturate(1.02) contrast(1.03)}
.cp-login-hero-photo::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg,rgba(15,23,42,.38),rgba(15,118,110,.76));z-index:-1}
.cp-login-photo-overlay{position:relative;margin-top:auto;padding:clamp(28px,5vw,58px);color:#fff}.cp-login-photo-overlay h1{font-size:clamp(28px,4vw,50px);line-height:1.35;margin:16px 0 10px}.cp-login-photo-overlay p{max-width:680px;line-height:2;color:rgba(255,255,255,.86);margin:0}.cp-login-card-premium{background:rgba(255,255,255,.94)}.cp-login-title.compact{margin-bottom:8px}.cp-auth-form{margin-top:18px}.cp-field-floating input{height:52px}.cp-captcha-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid rgba(37,99,235,.16);border-radius:20px;padding:13px;background:linear-gradient(135deg,#eff6ff,#fff)}.cp-captcha-card span{display:block;color:#64748b;font-size:12px;font-weight:800}.cp-captcha-card strong{font-size:20px;color:#0f172a}.cp-captcha-card label{margin:0;min-width:112px}.cp-captcha-card input{width:100%;height:44px;border:1px solid #bfdbfe;border-radius:14px;text-align:center;font-weight:900}.cp-validation-line{display:block;color:#dc2626;margin-top:6px}.cp-login-options{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0}.cp-login-options a{font-weight:900;color:#2563eb}.cp-wide-btn{width:100%;min-height:52px}.cp-login-note.clean{background:#f8fafc;border:1px solid #e2e8f0}.cp-back-main-login{display:flex;justify-content:center;margin-top:12px;color:#475569;font-weight:900}.cp-reset-code-box{display:grid;gap:8px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:20px;padding:13px;margin:14px 0}.cp-reset-code-box span{display:flex;justify-content:space-between;gap:10px}.cp-reset-code-box small{color:#64748b}.cp-detail-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;border:1px solid rgba(148,163,184,.24);border-radius:28px;background:linear-gradient(135deg,#fff,#f8fbff);box-shadow:0 18px 42px rgba(15,23,42,.06);padding:24px;margin-bottom:18px}.cp-detail-hero h2{margin:6px 0 8px;font-size:clamp(24px,3vw,36px)}.cp-detail-hero p{margin:0;color:#475569;line-height:2;white-space:pre-wrap}.cp-detail-hero small{display:block;margin-top:12px;color:#64748b}.cp-print-btn{border:0;border-radius:16px;background:#0f172a;color:#fff;padding:12px 18px;font-weight:900;cursor:pointer}.cp-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cp-detail-row{border:1px solid #e2e8f0;border-radius:18px;background:#f8fafc;padding:14px}.cp-detail-row span{display:block;color:#64748b;font-size:12px;margin-bottom:6px}.cp-detail-row b{display:block;color:#0f172a;line-height:1.8;overflow-wrap:anywhere}.cp-timeline-clickable .cp-inline-action{margin-top:10px}.cp-sidebar-footer a{color:#fff;text-decoration:none;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);padding:7px 10px;border-radius:999px;font-weight:900}
@media(max-width:860px){.cp-login-shell-photo{grid-template-columns:1fr}.cp-login-hero-photo{min-height:360px}.cp-login-options,.cp-reset-code-box span,.cp-detail-hero{align-items:stretch;flex-direction:column}.cp-detail-grid{grid-template-columns:1fr}.cp-captcha-card{align-items:stretch;flex-direction:column}.cp-captcha-card label{min-width:0}.cp-print-btn{width:100%}}
@media print{.cp-sidebar,.cp-topbar,.cp-print-btn,.cp-user-box,.cp-nav,.cp-sidebar-footer{display:none!important}.cp-shell{display:block}.cp-main{padding:0}.cp-panel,.cp-detail-hero{box-shadow:none;border-color:#d1d5db}.printable-note{display:block}}

/* Phase 96 - login and dashboard polish, mobile/PWA friendly */
.cp-login-v96{min-height:100vh;background:linear-gradient(135deg,#eef5ff 0%,#f8fafc 48%,#eef2ff 100%);display:grid;place-items:center;padding:24px;overflow-x:hidden}.cp-auth-shell-v96{width:min(1120px,100%);min-height:680px;display:grid;grid-template-columns:minmax(0,1.06fr) minmax(360px,.94fr);gap:18px;align-items:stretch}.cp-auth-photo-v96{position:relative;overflow:hidden;border-radius:34px;min-height:680px;background:#0f172a;box-shadow:0 26px 70px rgba(15,23,42,.18)}.cp-auth-photo-v96 .cp-auth-media{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(1.04) contrast(1.02)}.cp-auth-photo-v96:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(15,23,42,.08),rgba(15,23,42,.28));pointer-events:none}.cp-auth-card-v96{border-radius:34px;background:rgba(255,255,255,.96);border:1px solid rgba(226,232,240,.9);box-shadow:0 26px 70px rgba(15,23,42,.14);padding:42px 38px;display:flex;flex-direction:column;justify-content:center}.cp-auth-brand-v96{display:flex;align-items:center;gap:14px;margin-bottom:28px}.cp-auth-brand-v96 img{width:58px;height:58px;border-radius:18px;object-fit:contain;background:#fff;border:1px solid #e5e7eb;box-shadow:0 12px 28px rgba(15,23,42,.08);padding:7px}.cp-auth-brand-v96 h1{margin:0;color:#0f172a;font-size:clamp(22px,2.6vw,31px);font-weight:950;letter-spacing:-.02em}.cp-auth-form-v96{display:grid;gap:14px}.cp-field-v96{background:#f8fafc;border:1px solid #e5e7eb;border-radius:18px;padding:12px 14px}.cp-field-v96 span{font-size:12px;color:#64748b;font-weight:850}.cp-field-v96 input{border:0;background:transparent;outline:0;width:100%;font:inherit;color:#0f172a;font-weight:800;padding-top:7px}.cp-captcha-mainlike-v96{display:flex;align-items:center;justify-content:space-between;gap:14px;background:linear-gradient(135deg,#eff6ff,#fff);border:1px solid #bfdbfe;border-radius:20px;padding:14px 16px;box-shadow:0 12px 26px rgba(37,99,235,.08)}.cp-captcha-mainlike-v96 .captcha-title{display:block;color:#2563eb;font-size:12px;font-weight:900;margin-bottom:3px}.cp-captcha-mainlike-v96 strong{font-size:20px;color:#0f172a;direction:ltr;display:block}.cp-captcha-mainlike-v96 .captcha-input-wrap{width:116px}.cp-captcha-mainlike-v96 input{width:100%;height:45px;border:1px solid #cbd5e1;border-radius:15px;text-align:center;font:inherit;font-weight:950;background:#fff;outline:none}.cp-login-options-v96{align-items:center;margin:2px 0 4px}.cp-auth-submit-v96{min-height:54px;border-radius:18px;font-size:15px;font-weight:950}.cp-staff-login-btn-v96{margin-top:14px;min-height:50px;border-radius:18px;border:1px solid rgba(15,23,42,.12);background:#f8fafc;color:#0f172a;text-decoration:none;display:flex;align-items:center;justify-content:center;font-weight:950;transition:.16s ease}.cp-staff-login-btn-v96:hover{transform:translateY(-1px);background:#eef2ff;border-color:#c7d2fe}.cp-portal-v96 .cp-main{background:linear-gradient(135deg,#f8fafc,#eef4ff)}.cp-topbar-v96{border-radius:26px;background:rgba(255,255,255,.86);backdrop-filter:blur(14px);border:1px solid rgba(226,232,240,.86);box-shadow:0 18px 45px rgba(15,23,42,.08);align-items:center}.cp-date-box-v96{display:flex;flex-direction:column;gap:5px}.cp-top-date-v96{font-size:16px;font-weight:950;color:#0f172a}.cp-date-box-v96 b{font-size:18px;color:#2563eb;letter-spacing:.02em;direction:ltr;text-align:right}.cp-user-box-v96{display:flex;align-items:center;gap:12px}.cp-user-profile-link-v96{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 10px;border-radius:18px;text-decoration:none;color:#0f172a;background:#f8fafc;border:1px solid #e5e7eb;font-weight:950}.cp-user-profile-link-v96:hover{background:#eef2ff}.cp-top-avatar-v96{width:38px;height:38px;border-radius:15px;background:linear-gradient(135deg,#2563eb,#14b8a6);color:#fff;display:grid;place-items:center;font-weight:950;overflow:hidden}.cp-top-avatar-v96 img{width:100%;height:100%;object-fit:cover}.cp-dashboard-hero-v96{display:flex;align-items:center;justify-content:space-between;gap:18px;border-radius:30px;background:linear-gradient(135deg,#0f172a,#1e3a8a);padding:24px;color:#fff;box-shadow:0 24px 60px rgba(15,23,42,.16);margin-bottom:18px}.cp-dashboard-profile-v96{display:flex;align-items:center;gap:16px;min-width:0}.cp-dashboard-logo-v96{width:92px;height:92px;border-radius:28px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);display:grid;place-items:center;overflow:hidden;flex:0 0 auto;box-shadow:0 18px 40px rgba(0,0,0,.18)}.cp-dashboard-logo-v96 img{width:100%;height:100%;object-fit:cover}.cp-dashboard-logo-v96 span{font-size:34px;font-weight:950;color:#fff}.cp-dashboard-profile-v96 h2{margin:5px 0 0;font-size:clamp(22px,3vw,34px);font-weight:950}.cp-dashboard-tags-v96{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.cp-dashboard-tags-v96 span{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.13);border-radius:999px;padding:7px 11px;font-size:12px;font-weight:850}.cp-dashboard-actions-v96{display:flex;gap:10px;flex-wrap:wrap}.cp-dashboard-actions-v96 a{white-space:nowrap}.cp-dashboard-card-grid-v96{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.cp-dashboard-module-card-v96{min-height:142px;border-radius:26px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 16px 42px rgba(15,23,42,.07);padding:18px;text-decoration:none;color:#0f172a;display:flex;flex-direction:column;gap:11px;transition:.16s ease}.cp-dashboard-module-card-v96:hover{transform:translateY(-2px);box-shadow:0 22px 50px rgba(15,23,42,.1)}.cp-dashboard-module-card-v96 .cp-module-icon{width:44px;height:44px;border-radius:17px;background:#eff6ff;display:grid;place-items:center;font-size:20px}.cp-dashboard-module-card-v96 strong{font-size:15px;font-weight:950}.cp-dashboard-module-card-v96 em{margin-top:auto;font-style:normal;color:#2563eb;font-weight:950;font-size:22px}.cp-dashboard-panels-v96{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.cp-card-panel-v96{border-radius:26px!important;box-shadow:0 16px 42px rgba(15,23,42,.07)!important}.cp-page-actions-v96{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cp-page-head-v96{align-items:center}.cp-profile-shell-v96{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px}.cp-profile-card-v96,.cp-profile-form-v96{border-radius:28px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 16px 42px rgba(15,23,42,.07)}.cp-profile-card-v96{padding:22px;text-align:center;align-self:start}.cp-profile-logo-v96{width:118px;height:118px;margin:0 auto 14px;border-radius:32px;background:#eff6ff;border:1px solid #dbeafe;display:grid;place-items:center;overflow:hidden}.cp-profile-logo-v96 img{width:100%;height:100%;object-fit:cover}.cp-profile-logo-v96 span{font-size:40px;font-weight:950;color:#2563eb}.cp-profile-card-v96 strong{display:block;color:#0f172a;font-size:18px;margin-bottom:8px}.cp-profile-card-v96 small{display:block;color:#64748b;line-height:1.9}.cp-profile-form-v96{padding:22px}.cp-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:1100px){.cp-auth-shell-v96{grid-template-columns:1fr;min-height:auto}.cp-auth-photo-v96{min-height:310px;order:1}.cp-auth-card-v96{order:2}.cp-dashboard-card-grid-v96{grid-template-columns:repeat(2,minmax(0,1fr))}.cp-profile-shell-v96{grid-template-columns:1fr}}@media(max-width:760px){.cp-login-v96{padding:12px}.cp-auth-card-v96{padding:24px 18px;border-radius:26px}.cp-auth-photo-v96{border-radius:26px;min-height:240px}.cp-captcha-mainlike-v96{align-items:stretch;flex-direction:column}.cp-captcha-mainlike-v96 .captcha-input-wrap{width:100%}.cp-dashboard-hero-v96{align-items:flex-start;flex-direction:column;border-radius:24px;padding:18px}.cp-dashboard-profile-v96{align-items:flex-start}.cp-dashboard-logo-v96{width:74px;height:74px;border-radius:22px}.cp-dashboard-card-grid-v96,.cp-dashboard-panels-v96,.cp-form-row{grid-template-columns:1fr}.cp-topbar-v96{gap:12px;align-items:stretch}.cp-user-box-v96{width:100%;justify-content:space-between}.cp-user-profile-link-v96{flex:1}.cp-top-date-v96{font-size:15px}.cp-date-box-v96 b{font-size:17px}.cp-dashboard-actions-v96{width:100%}.cp-dashboard-actions-v96 a{flex:1;text-align:center}.cp-page-actions-v96{width:100%}.cp-page-actions-v96 a{flex:1;text-align:center}}@media(max-width:430px){.cp-auth-brand-v96 h1{font-size:21px}.cp-dashboard-profile-v96{flex-direction:column}.cp-dashboard-module-card-v96{min-height:120px}.cp-topbar-v96{border-radius:22px}.cp-user-box-v96{flex-direction:column;align-items:stretch}.cp-user-box-v96 form button{width:100%}}

/* Phase 97 - focused customer portal login/dashboard/profile fixes */
.cp-auth-photo-v96{background:linear-gradient(135deg,#0f172a,#2563eb)!important;}
.cp-auth-photo-v96:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 18% 18%,rgba(20,184,166,.28),transparent 28%),linear-gradient(135deg,rgba(15,23,42,.06),rgba(15,23,42,.18));z-index:1;pointer-events:none}.cp-auth-photo-v96:after{z-index:2;background:linear-gradient(180deg,rgba(15,23,42,.02),rgba(15,23,42,.28))}.cp-auth-photo-v96 .cp-auth-media{position:absolute;inset:0;z-index:0;filter:saturate(1.08) contrast(1.03) brightness(1.04)}.cp-auth-photo-caption-v97{position:absolute;z-index:3;right:24px;left:24px;bottom:24px;padding:18px 20px;border-radius:24px;background:rgba(15,23,42,.58);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(14px);color:#fff;box-shadow:0 20px 55px rgba(15,23,42,.25)}.cp-auth-photo-caption-v97 span{display:inline-flex;margin-bottom:8px;border-radius:999px;background:rgba(255,255,255,.18);padding:6px 11px;font-size:12px;font-weight:900}.cp-auth-photo-caption-v97 strong{display:block;font-size:22px;line-height:1.75;font-weight:950}.cp-auth-card-v96{padding:40px 38px}.cp-auth-brand-v96{justify-content:flex-start}.cp-captcha-mainlike-v96{border-radius:18px;background:#f8fafc;border:1px solid #dbeafe;box-shadow:none}.cp-captcha-mainlike-v96 strong{font-size:18px}.cp-staff-login-btn-v96{background:linear-gradient(135deg,#f8fafc,#eef2ff);border-color:#dbeafe}.cp-date-box-v97{min-width:250px;border-radius:22px;background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff;padding:12px 16px;box-shadow:0 16px 36px rgba(37,99,235,.16);border:1px solid rgba(255,255,255,.2)}.cp-date-box-v97 .cp-top-date-v96{color:#fff;font-size:17px}.cp-date-box-v97 b{color:#dbeafe!important;font-size:22px!important;font-weight:950;letter-spacing:.05em}.cp-balanced-grid-v97{display:flex!important;flex-wrap:wrap;justify-content:center;align-items:stretch}.cp-balanced-grid-v97>.cp-dashboard-module-card-v96,.cp-balanced-grid-v97>.cp-stat-card{flex:1 1 220px;max-width:280px;min-width:220px}.cp-dashboard-module-card-v96,.cp-stat-card{height:148px}.cp-dashboard-module-card-v96{justify-content:space-between}.cp-stat-card{display:flex;flex-direction:column;justify-content:space-between;border-radius:26px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 16px 42px rgba(15,23,42,.07);padding:18px}.cp-stat-card span{font-weight:950;color:#0f172a}.cp-stat-card b{font-size:28px;color:#2563eb}.cp-stat-card small{color:#64748b;line-height:1.7}.cp-doc-link-v97{display:grid!important;gap:5px;text-decoration:none;color:#0f172a;transition:.16s ease}.cp-doc-link-v97:hover{transform:translateY(-1px);border-color:#bfdbfe;background:#eff6ff}.cp-doc-link-v97 strong{overflow-wrap:anywhere}.cp-profile-upload-v97{display:grid;gap:8px;margin-bottom:14px;padding:14px;border-radius:22px;background:linear-gradient(135deg,#f8fafc,#eff6ff);border:1px dashed #bfdbfe}.cp-profile-upload-v97 input[type=file]{padding:10px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;width:100%}.cp-profile-upload-v97 p{margin:0;color:#64748b;font-size:12px;line-height:1.9}.cp-profile-logo-v96 img,.cp-dashboard-logo-v96 img,.cp-top-avatar-v96 img{object-fit:cover;background:#fff}.cp-dashboard-panels-v96>.cp-panel{min-height:280px}.cp-dashboard-panels-v96{align-items:stretch}
@media(max-width:1100px){.cp-date-box-v97{min-width:0}.cp-balanced-grid-v97>.cp-dashboard-module-card-v96,.cp-balanced-grid-v97>.cp-stat-card{max-width:none;flex-basis:calc(50% - 8px)}}
@media(max-width:760px){.cp-auth-shell-v96{gap:12px}.cp-auth-photo-caption-v97{right:14px;left:14px;bottom:14px;padding:14px;border-radius:18px}.cp-auth-photo-caption-v97 strong{font-size:16px}.cp-date-box-v97{width:100%;align-items:flex-start}.cp-balanced-grid-v97>.cp-dashboard-module-card-v96,.cp-balanced-grid-v97>.cp-stat-card{flex-basis:100%;min-width:0;height:auto;min-height:128px}.cp-dashboard-module-card-v96,.cp-stat-card{height:auto}.cp-dashboard-panels-v96>.cp-panel{min-height:auto}}

/* Phase 98 - Customer portal dashboard/profile polish */
.cp-brand-logo-mark{
    background:#fff;
    padding:7px;
}
.cp-brand-logo-mark img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.cp-topbar-v98{
    min-height:auto;
    margin-bottom:18px;
}
.cp-user-box-v98{
    width:100%;
    border-radius:26px;
    padding:12px 14px;
    justify-content:space-between;
    gap:14px;
    box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.cp-user-profile-link-v98{
    min-width:0;
    display:flex;
    align-items:center;
    gap:12px;
}
.cp-top-avatar-v98{
    width:52px;
    height:52px;
    border-radius:18px;
    overflow:hidden;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,var(--cp-primary),var(--cp-accent));
    color:#fff;
    font-weight:900;
    flex:0 0 auto;
}
.cp-top-avatar-v98 img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.cp-user-box-v98 .cp-customer-name-v98{
    padding-inline-start:0;
    max-width:320px;
    font-weight:900;
    color:#0f172a;
}
.cp-welcome-time-v98{
    flex:1 1 auto;
    min-width:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:10px 14px;
    border-radius:20px;
    background:linear-gradient(135deg,#f8fafc,#eef6ff);
    border:1px solid rgba(148,163,184,.22);
    color:#334155;
}
.cp-welcome-time-v98 strong{color:#0f766e;white-space:nowrap;}
.cp-welcome-time-v98 span{padding:0!important;max-width:none!important;white-space:nowrap;color:#475569;}
.cp-welcome-time-v98 b{
    direction:ltr;
    min-width:86px;
    text-align:center;
    padding:7px 10px;
    border-radius:14px;
    color:#fff;
    background:#0f172a;
    box-shadow:0 8px 18px rgba(15,23,42,.14);
}
.cp-dashboard-hero-v98{align-items:center;}
.cp-dashboard-logo-v98{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease;}
.cp-dashboard-logo-v98:hover{transform:translateY(-2px);box-shadow:0 18px 34px rgba(37,99,235,.18);}
.cp-dashboard-card-grid-v98{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    justify-content:center;
    margin:18px 0;
}
.cp-dashboard-action-card-v98{
    min-height:168px;
    border:1px solid var(--cp-border);
    border-radius:24px;
    background:rgba(255,255,255,.9);
    box-shadow:0 16px 38px rgba(15,23,42,.07);
    padding:18px;
    display:grid;
    grid-template-rows:auto auto 1fr auto;
    gap:8px;
    align-items:start;
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.cp-dashboard-action-card-v98:hover{
    transform:translateY(-3px);
    border-color:rgba(37,99,235,.34);
    box-shadow:0 20px 44px rgba(37,99,235,.11);
}
.cp-card-icon-v98{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:21px;
}
.cp-dashboard-action-card-v98 strong{font-size:16px;color:#0f172a;line-height:1.7;}
.cp-dashboard-action-card-v98 em{
    align-self:center;
    justify-self:start;
    font-style:normal;
    font-size:28px;
    font-weight:900;
    color:#0f766e;
    line-height:1;
}
.cp-dashboard-action-card-v98 small{color:var(--cp-muted);line-height:1.8;}
.cp-dashboard-panels-v98{grid-template-columns:repeat(2,minmax(0,1fr));}
.cp-section-hero-v98{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}
.cp-profile-inline-message-v98{margin-bottom:14px;}
.cp-profile-card-v96 img[data-cp-profile-preview]{width:100%;height:100%;object-fit:cover;display:block;}
.cp-profile-contact-logo-v172{
    width:128px;
    height:128px;
    border-radius:36px;
    background:linear-gradient(135deg,#dbeafe,#ccfbf1);
    border-color:#bfdbfe;
    box-shadow:0 16px 34px rgba(37,99,235,.12);
}
.cp-profile-contact-logo-v172 img,
.cp-profile-company-logo-v172 img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.cp-profile-company-preview-v172{
    margin-top:18px;
    padding-top:16px;
    border-top:1px dashed #dbeafe;
    display:grid;
    place-items:center;
    gap:8px;
}
.cp-profile-company-logo-v172{
    width:72px;
    height:72px;
    border-radius:22px;
    margin:0;
    background:#f8fafc;
}
.cp-profile-company-logo-v172 span{font-size:24px;}
.cp-profile-company-preview-v172>span{
    color:#64748b;
    font-size:12px;
    font-weight:900;
}
.cp-contact-profile-upload-v172{
    background:linear-gradient(135deg,#f0fdfa,#eff6ff);
    border-style:solid;
    border-color:#bae6fd;
}
.cp-contact-profile-upload-v172 .cp-field>span{color:#0f766e;}
.cp-page-actions-v96{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.cp-secondary-link,
.cp-print-btn{
    min-height:42px;
    padding:0 16px;
    border-radius:15px;
    border:1px solid rgba(148,163,184,.32);
    background:#fff;
    color:#0f172a;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    cursor:pointer;
}
.cp-secondary-link:hover,.cp-print-btn:hover{border-color:rgba(15,118,110,.45);color:#0f766e;}
@media(max-width:1180px){.cp-dashboard-card-grid-v98{grid-template-columns:repeat(3,minmax(0,1fr));}.cp-welcome-time-v98{justify-content:flex-start;}}
@media(max-width:860px){
    .cp-user-box-v98{border-radius:22px;align-items:stretch;flex-direction:column;}
    .cp-welcome-time-v98{width:100%;min-width:0;flex-wrap:wrap;justify-content:space-between;}
    .cp-dashboard-card-grid-v98,.cp-dashboard-panels-v98{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
    .cp-dashboard-card-grid-v98,.cp-dashboard-panels-v98{grid-template-columns:1fr;}
    .cp-dashboard-action-card-v98{min-height:142px;}
    .cp-welcome-time-v98{display:grid;grid-template-columns:1fr;gap:8px;text-align:center;}
    .cp-user-box-v98 form button{width:100%;}
}

/* Phase 99: professional portal menu and customer profile print sheet */
.cp-nav-v99{gap:.55rem}
.cp-nav-v99 .cp-nav-label{display:block;margin:.45rem .35rem .15rem;color:#94a3b8;font-size:.78rem;font-weight:900;letter-spacing:-.01em}
.cp-nav-v99 .cp-nav-item{display:flex;align-items:center;gap:.75rem;padding:.78rem .82rem;border-radius:18px;text-decoration:none;color:#e5eefc;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);transition:transform .18s ease,border-color .18s ease,background .18s ease}
.cp-nav-v99 .cp-nav-item:hover{transform:translateY(-1px);background:rgba(255,255,255,.085);border-color:rgba(125,211,252,.35)}
.cp-nav-v99 .cp-nav-primary{background:linear-gradient(135deg,rgba(14,165,233,.24),rgba(20,184,166,.16));border-color:rgba(125,211,252,.28)}
.cp-nav-v99 .cp-nav-accent{background:linear-gradient(135deg,rgba(20,184,166,.22),rgba(59,130,246,.18));border-color:rgba(45,212,191,.35)}
.cp-nav-v99 .cp-nav-icon{width:36px;height:36px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:rgba(15,23,42,.45);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);flex:0 0 36px}
.cp-nav-v99 .cp-nav-item b{display:block;font-size:.92rem;line-height:1.45;color:#fff}
.cp-nav-v99 .cp-nav-item small{display:block;margin-top:.1rem;font-size:.72rem;color:#b6c6d8;line-height:1.45}

.cp-profile-sheet-v99{display:grid;gap:1rem}.cp-profile-toolbar{display:flex;justify-content:space-between;align-items:center;gap:.8rem;flex-wrap:wrap}.cp-print-button{border:0;border-radius:16px;padding:.78rem 1.15rem;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;font-family:inherit;font-weight:900;cursor:pointer;box-shadow:0 16px 34px rgba(37,99,235,.16)}.cp-profile-print-card{background:#fff;border:1px solid #e5e7eb;border-radius:30px;padding:1.35rem;box-shadow:0 22px 60px rgba(15,23,42,.08);color:#0f172a}.cp-profile-print-header{display:grid;grid-template-columns:210px 1fr 210px;gap:1rem;align-items:center;padding:1rem;border-radius:24px;background:linear-gradient(135deg,#f8fafc,#eef6ff);border:1px solid #e2e8f0}.cp-profile-logo-box{min-height:145px;border-radius:22px;background:#fff;border:1px solid #e5e7eb;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.42rem;text-align:center;padding:.8rem}.cp-profile-logo-box img{width:76px;height:76px;object-fit:contain;border-radius:18px}.cp-profile-logo-box b{width:76px;height:76px;border-radius:22px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:2rem}.cp-profile-logo-box span{font-size:.78rem;color:#64748b;font-weight:800}.cp-profile-logo-box strong{font-size:.9rem;color:#0f172a}.cp-profile-print-title{text-align:center}.cp-profile-print-title span{display:inline-flex;padding:.38rem .9rem;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-weight:900;font-size:.82rem}.cp-profile-print-title h1{margin:.75rem 0 .35rem;font-size:1.9rem;letter-spacing:-.04em}.cp-profile-print-title p{margin:0;color:#64748b;font-weight:700}.cp-profile-status-row{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem;margin:1rem 0}.cp-profile-status-row div{border:1px solid #e5e7eb;border-radius:18px;padding:.78rem .9rem;background:#fff}.cp-profile-status-row span{display:block;color:#64748b;font-size:.78rem;font-weight:800}.cp-profile-status-row b{display:block;margin-top:.25rem;color:#111827}.cp-profile-grid-v99{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.cp-profile-info-card{border:1px solid #e5e7eb;border-radius:22px;background:#fff;padding:1rem}.cp-profile-wide-card{grid-column:1/-1}.cp-profile-info-card h2{margin:0 0 .8rem;font-size:1rem;color:#0f172a}.cp-profile-info-card dl{display:grid;grid-template-columns:150px 1fr;gap:.55rem .75rem;margin:0}.cp-profile-info-card dt{color:#64748b;font-weight:900}.cp-profile-info-card dd{margin:0;color:#111827;font-weight:800;word-break:break-word}.cp-profile-print-footer{display:flex;justify-content:space-between;gap:1rem;margin-top:1rem;padding-top:.9rem;border-top:1px dashed #cbd5e1;color:#64748b;font-size:.82rem;font-weight:800}

@media(max-width:980px){.cp-profile-print-header{grid-template-columns:1fr}.cp-profile-status-row{grid-template-columns:repeat(2,1fr)}.cp-profile-grid-v99{grid-template-columns:1fr}.cp-profile-info-card dl{grid-template-columns:1fr}.cp-profile-print-title h1{font-size:1.45rem}}
@media print{body.customer-portal-body{background:#fff!important}.cp-sidebar,.cp-topbar,.no-print,.cp-alert{display:none!important}.cp-shell{display:block!important}.cp-main{padding:0!important}.cp-profile-print-card{box-shadow:none!important;border:0!important;border-radius:0!important;width:210mm;min-height:297mm;margin:0 auto;padding:12mm!important}.cp-profile-print-header{break-inside:avoid}.cp-profile-info-card{break-inside:avoid}.cp-profile-print-footer{position:fixed;bottom:8mm;left:12mm;right:12mm}.cp-profile-logo-box{min-height:115px}.cp-profile-logo-box img,.cp-profile-logo-box b{width:62px;height:62px}.customer-portal-body *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Phase 100 Revised - full customer ticketing */
.cp-ticket-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.cp-ticket-module-option{border:1px solid rgba(15,23,42,.1);border-radius:20px;background:#fff;padding:15px;display:grid;gap:6px;cursor:pointer;transition:.18s ease;box-shadow:0 10px 28px rgba(15,23,42,.04)}.cp-ticket-module-option:hover{transform:translateY(-2px);border-color:#93c5fd}.cp-ticket-module-option input{position:absolute;opacity:0;pointer-events:none}.cp-ticket-module-option:has(input:checked){border-color:#2563eb;background:linear-gradient(135deg,#eff6ff,#fff);box-shadow:0 18px 42px rgba(37,99,235,.12)}.cp-ticket-module-icon{width:42px;height:42px;border-radius:16px;display:grid;place-items:center;background:#f1f5f9;font-size:22px}.cp-ticket-module-option strong{font-size:15px;color:#0f172a}.cp-ticket-module-option small{color:#64748b;line-height:1.8}.cp-field.is-general{opacity:.72}.cp-live-badge{border-radius:999px;background:#dcfce7;color:#166534;padding:5px 10px;font-size:12px;font-weight:900}.cp-ticket-detail-head p span,.cp-ticket-detail-head p b{display:inline-block;margin-inline-end:4px}.ticket-permission-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}.portal-ticket-permissions-box{margin-top:18px;border:1px solid #e2e8f0;border-radius:20px;padding:16px;background:#fbfdff}
@media(max-width:900px){.cp-ticket-module-grid,.ticket-permission-grid{grid-template-columns:1fr}.cp-ticket-module-option{padding:13px}.portal-ticket-permissions-box{padding:12px}}

/* Phase 101 - ticket list live message polish */
.cp-live-hint{display:inline-flex;align-items:center;gap:.35rem;color:#64748b;font-size:.82rem;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:.35rem .7rem;white-space:nowrap}
.cp-ticket-last-message{margin-top:.75rem;padding:.78rem .9rem;border:1px solid rgba(14,165,233,.16);background:linear-gradient(135deg,rgba(240,249,255,.94),rgba(255,255,255,.98));border-radius:18px;box-shadow:0 10px 26px rgba(15,23,42,.045)}
.cp-ticket-last-message .cp-last-message-label{display:inline-flex;margin-bottom:.35rem;font-size:.76rem;font-weight:900;color:#0369a1;background:rgba(14,165,233,.1);border-radius:999px;padding:.18rem .52rem}
.cp-ticket-last-message p{margin:0;color:#0f172a;font-weight:800;line-height:1.9;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cp-ticket-last-message small{display:block;margin-top:.4rem;color:#64748b;font-weight:700}
.cp-ticket-card{transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.cp-ticket-card:hover{border-color:rgba(14,165,233,.28);box-shadow:0 18px 40px rgba(15,23,42,.08);transform:translateY(-1px)}
@media(max-width:720px){.cp-live-hint{white-space:normal;border-radius:16px}.cp-ticket-last-message{padding:.7rem}.cp-ticket-last-message p{-webkit-line-clamp:3}}


/* Phase 102: customer portal notification polish */
.cp-notification-button-v102{position:relative;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:16px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 10px 24px rgba(15,23,42,.06);text-decoration:none;color:#0f172a;font-size:18px;transition:.18s ease}.cp-notification-button-v102:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(37,99,235,.12)}.cp-notification-button-v102 b{position:absolute;top:-6px;left:-6px;min-width:20px;height:20px;border-radius:999px;background:#ef4444;color:#fff;border:2px solid #fff;font-size:10px;line-height:16px;text-align:center;padding:0 4px}.cp-notification-button-v102.has-unread{background:#eff6ff;color:#1d4ed8}.cp-portal-toast-root-v102{position:fixed;z-index:9999;left:22px;bottom:22px;display:grid;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}.cp-portal-toast-v102{display:grid;gap:4px;border-radius:18px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 20px 50px rgba(15,23,42,.16);padding:13px 15px;color:#0f172a;text-decoration:none;pointer-events:auto;animation:cpToastIn .22s ease both}.cp-portal-toast-v102 strong{font-size:14px}.cp-portal-toast-v102 span{font-size:13px;line-height:1.8;color:#334155}.cp-portal-toast-v102 small{font-size:11px;color:#64748b}.cp-portal-toast-v102.is-leaving{opacity:0;transform:translateY(8px)}@keyframes cpToastIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@media(max-width:700px){.cp-portal-toast-root-v102{left:12px;right:12px;bottom:14px;width:auto}.cp-notification-button-v102{width:38px;height:38px;border-radius:14px}}


/* Phase 103 Revised: ticket list tables for customer portal */
.cp-ticket-table-panel{overflow:visible}.cp-ticket-filter-row{display:grid;grid-template-columns:1.4fr 180px 180px;gap:10px;margin:0 0 14px;align-items:end}.cp-ticket-filter-row label{display:grid;gap:6px;font-size:12px;color:#64748b;font-weight:800}.cp-ticket-filter-row input{border:1px solid #dbe3ef;border-radius:14px;padding:10px 12px;font-family:inherit;min-height:42px}.cp-ticket-table-wrap{border:1px solid rgba(15,23,42,.08);border-radius:20px;background:#fff;overflow:hidden;box-shadow:0 12px 34px rgba(15,23,42,.04)}.cp-ticket-table{width:100%;border-collapse:separate;border-spacing:0}.cp-ticket-table th{background:#f8fafc;color:#475569;font-size:12px;text-align:right;padding:13px 12px;border-bottom:1px solid #e2e8f0}.cp-ticket-table td{padding:13px 12px;border-bottom:1px solid #eef2f7;vertical-align:middle;color:#334155}.cp-ticket-table tbody tr{cursor:pointer;transition:.18s ease}.cp-ticket-table tbody tr:hover{background:#f8fbff}.cp-ticket-table tbody tr.ticket-muted{opacity:.58;background:#fafafa}.cp-ticket-table tbody tr.ticket-muted:hover{opacity:.78}.ticket-title-cell strong{display:block;color:#0f172a;margin-bottom:6px}.ticket-title-cell small{display:block;color:#64748b;line-height:1.8}.ticket-last-message{max-width:360px}.ticket-last-message b{display:block;color:#0f172a;margin-bottom:5px}.ticket-last-message span{display:block;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cp-status-pill.muted{background:#e5e7eb!important;color:#64748b!important}.cp-table-action{display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#0f172a;color:#fff!important;text-decoration:none;font-weight:900;padding:9px 12px;white-space:nowrap}@media(max-width:900px){.cp-ticket-filter-row{grid-template-columns:1fr}.cp-ticket-table-wrap{overflow:auto}.cp-ticket-table{min-width:820px}}


/* Phase 104 Revised: ticket composer attachments, emoji and voice UI. */
.ticket-composer-tools{display:grid;gap:10px;margin-top:10px;padding:12px;border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc}
.ticket-emoji-bar{display:flex;gap:6px;flex-wrap:wrap}.ticket-emoji-bar button{border:1px solid #e2e8f0;background:#fff;border-radius:12px;min-width:36px;height:34px;cursor:pointer;font-size:17px}.ticket-upload-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ticket-file-picker,.ticket-voice-button{border:0;border-radius:14px;background:#0f172a;color:#fff;padding:10px 14px;font-family:inherit;font-weight:900;cursor:pointer;text-decoration:none}.ticket-file-picker input{display:none}.ticket-voice-button{background:#2563eb}.ticket-record-status{font-size:12px;color:#64748b;font-weight:800}.ticket-file-list{display:flex;gap:6px;flex-wrap:wrap}.ticket-file-chip{border:1px solid #dbeafe;background:#eff6ff;color:#1e40af;border-radius:999px;padding:5px 9px;font-size:12px}.ticket-upload-help{color:#64748b;line-height:1.9}.ticket-attachments-panel{grid-column:1/-1;border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:14px;margin-top:12px}.ticket-attachments-panel>strong{display:block;margin-bottom:10px}.ticket-attachments-grid{display:grid;gap:8px}.ticket-attachment-link{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;text-decoration:none;color:#0f172a;background:#f8fafc}.ticket-attachment-link small{color:#64748b}


/* PHASE105_DASHBOARD_ALERTS_AND_TICKET_COMPOSER */
.dashboard-system-alert-zone{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;align-items:stretch}
.dashboard-system-alert-zone:not(.has-alerts){display:none!important}
.dashboard-alert{display:flex;flex-direction:column;gap:4px;min-width:210px;max-width:360px;padding:10px 12px;border-radius:18px;text-decoration:none;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.32);box-shadow:0 14px 34px rgba(15,23,42,.13);color:inherit;backdrop-filter:blur(10px)}
.dashboard-alert strong{font-weight:900;font-size:.88rem}.dashboard-alert span{font-size:.76rem;line-height:1.8}.dashboard-alert.warning{background:rgba(255,247,237,.9);border-color:#fed7aa;color:#9a3412}.dashboard-alert.danger{background:rgba(254,226,226,.92);border-color:#fecaca;color:#991b1b}.dashboard-alert.success{background:rgba(220,252,231,.9);border-color:#bbf7d0;color:#166534}
.ticket-composer-pro{position:relative;display:flex;flex-direction:column;gap:12px;border:1px solid rgba(148,163,184,.25);border-radius:24px;background:linear-gradient(180deg,#fff,rgba(248,250,252,.92));padding:14px;box-shadow:0 18px 45px rgba(15,23,42,.06)}
.ticket-composer-textarea-pro{width:100%;min-height:130px;border:1px solid #dbe5f3!important;border-radius:18px!important;background:#fff!important;padding:14px 16px!important;line-height:2!important;resize:vertical;outline:none;box-shadow:inset 0 1px 0 rgba(15,23,42,.03)}
.ticket-composer-textarea-pro:focus{border-color:#60a5fa!important;box-shadow:0 0 0 4px rgba(59,130,246,.12), inset 0 1px 0 rgba(15,23,42,.03)}
.ticket-composer-toolbar-pro{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;order:5}.ticket-tool-btn-pro{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 14px;border:1px solid #dbe7f5;border-radius:999px;background:#f8fbff;color:#0f172a;font-weight:800;font-family:inherit;cursor:pointer;transition:.18s ease}.ticket-tool-btn-pro:hover{background:#eff6ff;border-color:#bfdbfe;transform:translateY(-1px)}.ticket-tool-btn-pro span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e0f2fe}.ticket-record-btn-pro.is-recording{background:#fff1f2;border-color:#fecdd3;color:#be123c;animation:ticketRecordPulse 1.15s ease-in-out infinite}@keyframes ticketRecordPulse{50%{box-shadow:0 0 0 6px rgba(244,63,94,.12)}}
.ticket-emoji-menu-pro{position:absolute;z-index:50;bottom:72px;right:18px;display:none;grid-template-columns:repeat(8,36px);gap:7px;padding:12px;border-radius:22px;background:rgba(255,255,255,.98);border:1px solid #dbe7f5;box-shadow:0 24px 65px rgba(15,23,42,.18)}.ticket-emoji-menu-pro.is-open{display:grid}.ticket-emoji-chip-pro{width:36px;height:36px;border:0;border-radius:13px;background:#f1f5f9;font-size:1.15rem;cursor:pointer;line-height:1;display:grid;place-items:center}.ticket-emoji-chip-pro:hover{background:#dbeafe;transform:translateY(-1px)}
.ticket-file-input-pro{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.ticket-file-list-pro{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px;order:6}.ticket-file-chip-pro{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:7px 10px;border-radius:999px;background:#eef6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-size:.78rem}.ticket-file-chip-pro span{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ticket-file-chip-pro b{font-size:.7rem;color:#64748b}.ticket-record-status-pro{font-size:.78rem;color:#64748b;min-height:20px;order:7}.ticket-composer-pro [data-ticket-emoji]:not(.ticket-emoji-chip-pro){display:none!important}
@media(max-width:760px){.ticket-composer-pro{padding:12px;border-radius:20px}.ticket-composer-toolbar-pro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ticket-tool-btn-pro{justify-content:center;width:100%;padding:0 8px}.ticket-emoji-menu-pro{right:12px;left:12px;bottom:72px;grid-template-columns:repeat(8,1fr)}.ticket-file-chip-pro span{max-width:150px}}
/* END_PHASE105_DASHBOARD_ALERTS_AND_TICKET_COMPOSER */



/* Phase106 - polished ticket composer, shamsi filters and latest tickets */
[data-ticket-composer="true"] .ticket-tool-row,
[data-ticket-composer="true"] .ticket-compose-tools,
[data-ticket-composer="true"] .ticket-composer-tools,
[data-ticket-composer="true"] .ticket-attachment-tools {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
    align-items: stretch !important;
    width: 100%;
    margin: 12px 0 !important;
}
[data-ticket-composer="true"] .ticket-tool-button,
[data-ticket-composer="true"] .ticket-tool-row > button,
[data-ticket-composer="true"] .ticket-tool-row > label,
[data-ticket-composer="true"] [data-ticket-record],
[data-ticket-composer="true"] [data-ticket-emoji-toggle] {
    min-height: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
[data-ticket-composer="true"] .ticket-tool-button span,
[data-ticket-composer="true"] .ticket-tool-button b { pointer-events:none; }
[data-ticket-composer="true"] .ticket-emoji-wrap { position: relative; min-width:0; }
[data-ticket-composer="true"] .ticket-emoji-popover {
    position: absolute;
    inset-inline-end: 0;
    bottom: calc(100% + 10px);
    width: min(260px, 78vw);
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(148,163,184,.35);
    box-shadow: 0 18px 45px rgba(15,23,42,.18);
    z-index: 50;
}
[data-ticket-composer="true"] .ticket-emoji-popover.is-open { display: grid; }
[data-ticket-composer="true"] .ticket-emoji-choice {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 12px !important;
    padding: 0 !important;
    font-size: 18px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}
[data-ticket-composer="true"] .ticket-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 10px;
    margin: 4px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    font-size: 12px;
}
[data-ticket-composer="true"] .ticket-file-chip span { max-width: 170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
[data-ticket-composer="true"] .ticket-file-chip b { color:#64748b; font-weight:700; }
[data-ticket-composer="true"] [data-ticket-record].is-recording { background:#fee2e2 !important; color:#991b1b !important; border-color:#fecaca !important; }
[data-ticket-composer="true"] [data-ticket-record-status] { display:block; min-height:20px; margin-top:4px; color:#64748b; font-size:12px; }
[data-ticket-composer="true"] .ticket-upload-help,
[data-ticket-composer="true"] .ticket-attachment-help,
[data-ticket-composer="true"] .ticket-file-help,
[data-ticket-composer="true"] .composer-help { display:none !important; }
.cp-ticket-filter-row-polished,
.cp-ticket-filter-row-persian {
    display: grid !important;
    grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(300px, 1fr)) !important;
    gap: 14px !important;
    align-items: end !important;
    overflow: visible !important;
    max-width: 100% !important;
}
.cp-ticket-filter-row-polished label,
.cp-ticket-filter-row-polished .cp-persian-date-filter,
.cp-ticket-filter-row-persian label,
.cp-ticket-filter-row-persian .cp-persian-date-filter { min-width:0 !important; width:100% !important; }
.cp-persian-date-grid { display:grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
.cp-persian-date-grid select,
.cp-ticket-filter-row-persian input,
.cp-ticket-filter-row-persian select {
    min-height: 42px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 13px !important;
    max-width: 100% !important;
}
.cp-ticket-table-wrap { max-width:100%; overflow-x:auto; }
.cp-ticket-list.compact .cp-ticket-item { border-radius:18px; }
@media (max-width: 980px){
    .cp-ticket-filter-row-polished,
    .cp-ticket-filter-row-persian { grid-template-columns: 1fr !important; }
    [data-ticket-composer="true"] .ticket-tool-row,
    [data-ticket-composer="true"] .ticket-compose-tools,
    [data-ticket-composer="true"] .ticket-composer-tools,
    [data-ticket-composer="true"] .ticket-attachment-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px){
    [data-ticket-composer="true"] .ticket-tool-row,
    [data-ticket-composer="true"] .ticket-compose-tools,
    [data-ticket-composer="true"] .ticket-composer-tools,
    [data-ticket-composer="true"] .ticket-attachment-tools { grid-template-columns: 1fr; }
}


/* Phase107 - repair ticket composer layout and restore portal login visual */
.cp-auth-photo-v96,
.cp-auth-photo-v95,
.cp-auth-photo {
    background-image: linear-gradient(145deg, rgba(15,23,42,.16), rgba(30,64,175,.10)), url('/img/customer-portal/customer-portal-login.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    overflow: hidden !important;
}
.cp-auth-media {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    background: transparent !important;
}
.cp-auth-photo-v96::before,
.cp-auth-photo-v95::before,
.cp-auth-photo::before { content:none !important; }
.cp-auth-photo-caption-v97,
.cp-auth-photo-caption-v96,
.cp-auth-photo-caption {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0,0,0,.42) !important;
}
[data-ticket-composer="true"] .ticket-tool-row,
[data-ticket-composer="true"] .ticket-tool-row-v107,
[data-ticket-composer="true"] .ticket-compose-tools,
[data-ticket-composer="true"] .ticket-composer-tools,
[data-ticket-composer="true"] .ticket-attachment-tools {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 12px 0 14px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    border: 1px dashed rgba(148,163,184,.40) !important;
    background: rgba(248,250,252,.84) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}
[data-ticket-composer="true"] .ticket-tool-button,
[data-ticket-composer="true"] .ticket-tool-row > button,
[data-ticket-composer="true"] .ticket-tool-row > label,
[data-ticket-composer="true"] [data-ticket-record],
[data-ticket-composer="true"] [data-ticket-emoji-toggle] {
    position: relative !important;
    z-index: 2 !important;
    flex: 1 1 0 !important;
    min-width: 102px !important;
    max-width: 136px !important;
    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 12px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    font-size: 13.5px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    box-shadow: 0 10px 22px rgba(15,23,42,.08) !important;
}
[data-ticket-composer="true"] .ticket-tool-button span,
[data-ticket-composer="true"] .ticket-tool-button b {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    color: inherit !important;
}
[data-ticket-composer="true"] .ticket-tool-attach,
[data-ticket-composer="true"] label.ticket-tool-button { background:#0f172a !important; color:#fff !important; }
[data-ticket-composer="true"] .ticket-tool-record,
[data-ticket-composer="true"] [data-ticket-record] { background:#2563eb !important; color:#fff !important; }
[data-ticket-composer="true"] .ticket-tool-emoji,
[data-ticket-composer="true"] [data-ticket-emoji-toggle] { background:#ffffff !important; color:#0f172a !important; }
[data-ticket-composer="true"] [data-ticket-record].is-recording { background:#dc2626 !important; color:#fff !important; }
[data-ticket-composer="true"] .ticket-emoji-wrap {
    position: relative !important;
    display: inline-flex !important;
    flex: 1 1 0 !important;
    min-width: 102px !important;
    max-width: 136px !important;
    width: auto !important;
    overflow: visible !important;
}
[data-ticket-composer="true"] .ticket-emoji-wrap > .ticket-tool-button { flex: 1 1 auto !important; max-width: none !important; min-width: 0 !important; width: 100% !important; }
[data-ticket-composer="true"] .ticket-emoji-popover:not(.is-open) { display: none !important; }
[data-ticket-composer="true"] .ticket-emoji-popover {
    position: absolute !important;
    inset-inline-end: 0 !important;
    bottom: calc(100% + 12px) !important;
    width: 248px !important;
    max-width: min(248px, 78vw) !important;
    display: none !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 7px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.98) !important;
    border: 1px solid rgba(148,163,184,.35) !important;
    box-shadow: 0 18px 45px rgba(15,23,42,.22) !important;
    z-index: 999 !important;
}
[data-ticket-composer="true"] .ticket-emoji-popover.is-open { display: grid !important; }
[data-ticket-composer="true"] .ticket-emoji-choice {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    border-radius: 12px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}
[data-ticket-composer="true"] .ticket-upload-help,
[data-ticket-composer="true"] .ticket-attachment-help,
[data-ticket-composer="true"] .ticket-file-help,
[data-ticket-composer="true"] .composer-help { display:none !important; }
[data-ticket-composer="true"] [data-ticket-file-list] { display:flex !important; flex-wrap:wrap !important; gap:6px !important; margin-top:6px !important; }
[data-ticket-composer="true"] textarea { width:100% !important; box-sizing:border-box !important; }
@media (max-width: 520px){
    [data-ticket-composer="true"] .ticket-tool-row,
    [data-ticket-composer="true"] .ticket-tool-row-v107,
    [data-ticket-composer="true"] .ticket-compose-tools,
    [data-ticket-composer="true"] .ticket-composer-tools,
    [data-ticket-composer="true"] .ticket-attachment-tools { gap:8px !important; padding:8px !important; }
    [data-ticket-composer="true"] .ticket-tool-button,
    [data-ticket-composer="true"] .ticket-tool-row > button,
    [data-ticket-composer="true"] .ticket-tool-row > label,
    [data-ticket-composer="true"] [data-ticket-record],
    [data-ticket-composer="true"] [data-ticket-emoji-toggle],
    [data-ticket-composer="true"] .ticket-emoji-wrap { min-width: 88px !important; max-width: none !important; font-size: 12.5px !important; }
}


/* Phase108 - final ticket composer width/layout and customer portal login photo */
.ticket-tool-duplicate-hide { display: none !important; }
.cp-auth-photo,
.cp-auth-photo-v95,
.cp-auth-photo-v96,
.cp-auth-photo-v97,
.customer-portal-login-photo,
.customer-portal-auth-photo {
    background-image: linear-gradient(145deg, rgba(15,23,42,.18), rgba(30,64,175,.10)), url('/img/customer-portal/customer-portal-login.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-color: #0f172a !important;
}
.cp-auth-photo img,
.cp-auth-photo-v95 img,
.cp-auth-photo-v96 img,
.cp-auth-photo-v97 img,
.customer-portal-login-photo img,
.customer-portal-auth-photo img,
.cp-auth-media {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    background: transparent !important;
}
.ticket-detail-grid,
.portal-ticket-detail-grid,
.customer-ticket-detail-grid,
.ticket-detail-layout,
.cp-ticket-detail-grid,
.cp-ticket-conversation-layout,
.ticket-admin-detail-grid,
.admin-ticket-detail-grid,
.ticket-thread-layout,
.cp-ticket-thread-layout {
    display: grid !important;
    grid-template-columns: minmax(410px, 470px) minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}
.ticket-compose-panel,
.ticket-reply-panel,
.ticket-response-panel,
.ticket-message-panel,
.ticket-composer-panel,
.cp-ticket-compose-panel,
.cp-ticket-reply-panel,
.cp-ticket-side-panel,
.cp-ticket-reply-card,
.cp-ticket-compose-card,
.ticket-sidebar-card,
.ticket-admin-reply-card {
    min-width: 400px !important;
    max-width: 470px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
[data-ticket-composer="true"],
.ticket-composer-normalized-v108 {
    overflow: visible !important;
}
[data-ticket-composer="true"] textarea {
    width: 100% !important;
    min-height: 170px !important;
    box-sizing: border-box !important;
}
[data-ticket-composer="true"] .ticket-tool-row-v108,
[data-ticket-composer="true"] .ticket-tool-row,
.ticket-composer-normalized-v108 .ticket-tool-row-v108 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(112px, 1fr)) !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: stretch !important;
    width: 100% !important;
    margin: 12px 0 12px !important;
    padding: 12px !important;
    border-radius: 20px !important;
    border: 1px dashed rgba(148,163,184,.38) !important;
    background: rgba(248,250,252,.88) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}
[data-ticket-composer="true"] .ticket-tool-button,
[data-ticket-composer="true"] .ticket-tool-row-v108 > label,
[data-ticket-composer="true"] .ticket-tool-row-v108 > button,
[data-ticket-composer="true"] .ticket-tool-row-v108 .ticket-emoji-wrap,
[data-ticket-composer="true"] [data-ticket-record],
[data-ticket-composer="true"] [data-ticket-emoji-toggle] {
    width: 100% !important;
    min-width: 112px !important;
    max-width: none !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
}
[data-ticket-composer="true"] .ticket-tool-attach { background: #0f172a !important; color: #fff !important; border: 1px solid rgba(15,23,42,.12) !important; }
[data-ticket-composer="true"] .ticket-tool-record { background: #2563eb !important; color: #fff !important; border: 1px solid rgba(37,99,235,.18) !important; }
[data-ticket-composer="true"] .ticket-tool-emoji { background: #fff !important; color: #0f172a !important; border: 1px solid rgba(148,163,184,.35) !important; }
[data-ticket-composer="true"] .ticket-tool-button span,
[data-ticket-composer="true"] .ticket-tool-button b { display:inline-flex !important; align-items:center !important; color:inherit !important; pointer-events:none !important; }
[data-ticket-composer="true"] .ticket-emoji-wrap-v108 { position: relative !important; overflow: visible !important; }
[data-ticket-composer="true"] .ticket-emoji-popover:not(.is-open) { display: none !important; }
[data-ticket-composer="true"] .ticket-emoji-popover {
    position: absolute !important;
    inset-inline-end: 0 !important;
    bottom: calc(100% + 12px) !important;
    width: 258px !important;
    max-width: min(258px, 78vw) !important;
    display: none !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 7px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.98) !important;
    border: 1px solid rgba(148,163,184,.35) !important;
    box-shadow: 0 18px 45px rgba(15,23,42,.22) !important;
    z-index: 9999 !important;
}
[data-ticket-composer="true"] .ticket-emoji-popover.is-open { display: grid !important; }
[data-ticket-composer="true"] .ticket-emoji-choice {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    border-radius: 12px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}
[data-ticket-composer="true"] .ticket-file-list,
[data-ticket-composer="true"] [data-ticket-file-list] { display:flex !important; flex-wrap:wrap !important; gap:6px !important; margin: 6px 0 10px !important; }
[data-ticket-composer="true"] .ticket-file-chip { display:inline-flex !important; gap:8px !important; align-items:center !important; max-width:100% !important; padding:7px 10px !important; border-radius:999px !important; background:#eff6ff !important; color:#1e3a8a !important; border:1px solid #bfdbfe !important; font-size:12px !important; }
[data-ticket-composer="true"] .ticket-file-chip span { max-width:180px !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }
[data-ticket-composer="true"] [data-ticket-record].is-recording { background:#dc2626 !important; color:#fff !important; }
[data-ticket-composer="true"] [data-ticket-record-status] { display:block !important; min-height:20px !important; margin: 4px 0 8px !important; color:#64748b !important; font-size:12px !important; text-align:center !important; }
@media (max-width: 1200px){
    .ticket-detail-grid,
    .portal-ticket-detail-grid,
    .customer-ticket-detail-grid,
    .ticket-detail-layout,
    .cp-ticket-detail-grid,
    .cp-ticket-conversation-layout,
    .ticket-admin-detail-grid,
    .admin-ticket-detail-grid,
    .ticket-thread-layout,
    .cp-ticket-thread-layout { grid-template-columns: 1fr !important; }
    .ticket-compose-panel,
    .ticket-reply-panel,
    .ticket-response-panel,
    .ticket-message-panel,
    .ticket-composer-panel,
    .cp-ticket-compose-panel,
    .cp-ticket-reply-panel,
    .cp-ticket-side-panel,
    .cp-ticket-reply-card,
    .cp-ticket-compose-card,
    .ticket-sidebar-card,
    .ticket-admin-reply-card { max-width: 100% !important; min-width: 0 !important; }
}
@media (max-width: 560px){
    [data-ticket-composer="true"] .ticket-tool-row-v108,
    [data-ticket-composer="true"] .ticket-tool-row { grid-template-columns: 1fr !important; }
    [data-ticket-composer="true"] .ticket-tool-button,
    [data-ticket-composer="true"] .ticket-tool-row-v108 > label,
    [data-ticket-composer="true"] .ticket-tool-row-v108 > button,
    [data-ticket-composer="true"] .ticket-tool-row-v108 .ticket-emoji-wrap { min-width:0 !important; }
}


/* Phase109 - unified ticket composer final layout. No controller/query changes. */
.ticket-tool-old-hidden{display:none!important;visibility:hidden!important;inline-size:0!important;block-size:0!important;overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;}
.ticket-file-input-v109{position:absolute!important;inline-size:1px!important;block-size:1px!important;opacity:0!important;pointer-events:none!important;}
.ticket-detail-grid,.portal-ticket-detail-grid,.customer-ticket-detail-grid,.ticket-detail-layout,.cp-ticket-detail-grid,.cp-ticket-conversation-layout,.ticket-admin-detail-grid,.admin-ticket-detail-grid,.ticket-thread-layout,.cp-ticket-thread-layout{display:grid!important;grid-template-columns:minmax(380px,420px) minmax(0,1fr)!important;gap:24px!important;align-items:start!important;overflow:visible!important;}
.ticket-compose-panel,.ticket-reply-panel,.ticket-response-panel,.ticket-message-panel,.ticket-composer-panel,.cp-ticket-compose-panel,.cp-ticket-reply-panel,.cp-ticket-side-panel,.cp-ticket-reply-card,.cp-ticket-compose-card,.ticket-sidebar-card,.ticket-admin-reply-card{min-width:380px!important;max-width:420px!important;width:100%!important;box-sizing:border-box!important;overflow:visible!important;}
.ticket-composer-final-v109,[data-ticket-composer="true"]{overflow:visible!important;box-sizing:border-box!important;}
.ticket-composer-final-v109 textarea,[data-ticket-composer="true"] textarea{inline-size:100%!important;min-block-size:168px!important;box-sizing:border-box!important;resize:vertical!important;}
.ticket-tool-row-v109{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;inline-size:100%!important;max-inline-size:100%!important;margin:12px 0 12px!important;padding:10px!important;box-sizing:border-box!important;border-radius:20px!important;border:1px dashed rgba(148,163,184,.38)!important;background:rgba(248,250,252,.92)!important;overflow:visible!important;direction:rtl!important;}
.ticket-tool-row-v109 .ticket-tool-button,.ticket-tool-row-v109>label,.ticket-tool-row-v109>button,.ticket-tool-row-v109 .ticket-emoji-wrap-v109{flex:1 1 0!important;min-width:0!important;max-width:none!important;width:auto!important;inline-size:auto!important;height:50px!important;min-height:50px!important;border-radius:16px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:0 10px!important;box-sizing:border-box!important;white-space:nowrap!important;text-decoration:none!important;font-size:14px!important;font-weight:900!important;line-height:1!important;}
.ticket-tool-row-v109 .ticket-tool-button span,.ticket-tool-row-v109 .ticket-tool-button b{display:inline-flex!important;align-items:center!important;color:inherit!important;line-height:1!important;pointer-events:none!important;}
.ticket-tool-row-v109 .ticket-tool-attach{background:#0f172a!important;color:#fff!important;border:1px solid rgba(15,23,42,.12)!important;}
.ticket-tool-row-v109 .ticket-tool-record{background:#2563eb!important;color:#fff!important;border:1px solid rgba(37,99,235,.18)!important;}
.ticket-tool-row-v109 .ticket-tool-emoji{background:#fff!important;color:#0f172a!important;border:1px solid rgba(148,163,184,.38)!important;}
.ticket-emoji-wrap-v109{position:relative!important;overflow:visible!important;padding:0!important;background:transparent!important;border:0!important;}
.ticket-emoji-popover-v109{position:absolute!important;inset-inline-end:0!important;bottom:calc(100% + 10px)!important;width:260px!important;max-width:min(260px,80vw)!important;display:none!important;grid-template-columns:repeat(6,1fr)!important;gap:7px!important;padding:10px!important;border-radius:18px!important;background:rgba(255,255,255,.98)!important;border:1px solid rgba(148,163,184,.35)!important;box-shadow:0 18px 45px rgba(15,23,42,.22)!important;z-index:9999!important;}
.ticket-emoji-popover-v109.is-open{display:grid!important;}
.ticket-emoji-popover-v109 .ticket-emoji-choice{inline-size:34px!important;block-size:34px!important;min-inline-size:34px!important;border-radius:12px!important;padding:0!important;font-size:18px!important;line-height:1!important;background:#f8fafc!important;color:#0f172a!important;border:1px solid #e2e8f0!important;box-shadow:none!important;}
.ticket-file-list,[data-ticket-file-list]{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:6px 0 10px!important;}
.ticket-file-chip{display:inline-flex!important;gap:8px!important;align-items:center!important;max-width:100%!important;padding:7px 10px!important;border-radius:999px!important;background:#eff6ff!important;color:#1e3a8a!important;border:1px solid #bfdbfe!important;font-size:12px!important;}
.ticket-file-chip span{max-width:180px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
.ticket-tool-row-v109 [data-ticket-record].is-recording,.ticket-tool-record.is-recording{background:#dc2626!important;color:#fff!important;}
.ticket-record-status-v109{display:block!important;min-height:20px!important;margin:4px 0 8px!important;color:#64748b!important;font-size:12px!important;text-align:center!important;}
/* Portal login real photo fallback */
.cp-auth-photo,.cp-auth-photo-v95,.cp-auth-photo-v96,.cp-auth-photo-v97,.customer-portal-login-photo,.customer-portal-auth-photo{background-image:linear-gradient(145deg,rgba(15,23,42,.16),rgba(30,64,175,.12)),url('/img/customer-portal/customer-portal-login.webp')!important;background-size:cover!important;background-position:center!important;background-color:#0f172a!important;}
.cp-auth-photo img,.cp-auth-photo-v95 img,.cp-auth-photo-v96 img,.cp-auth-photo-v97 img,.customer-portal-login-photo img,.customer-portal-auth-photo img,.cp-auth-media{width:100%!important;height:100%!important;min-height:100%!important;object-fit:cover!important;object-position:center!important;display:block!important;background:transparent!important;}
@media (max-width:1240px){.ticket-detail-grid,.portal-ticket-detail-grid,.customer-ticket-detail-grid,.ticket-detail-layout,.cp-ticket-detail-grid,.cp-ticket-conversation-layout,.ticket-admin-detail-grid,.admin-ticket-detail-grid,.ticket-thread-layout,.cp-ticket-thread-layout{grid-template-columns:1fr!important}.ticket-compose-panel,.ticket-reply-panel,.ticket-response-panel,.ticket-message-panel,.ticket-composer-panel,.cp-ticket-compose-panel,.cp-ticket-reply-panel,.cp-ticket-side-panel,.cp-ticket-reply-card,.cp-ticket-compose-card,.ticket-sidebar-card,.ticket-admin-reply-card{min-width:0!important;max-width:100%!important}}
@media (max-width:520px){.ticket-tool-row-v109{gap:8px!important;padding:8px!important}.ticket-tool-row-v109 .ticket-tool-button,.ticket-tool-row-v109>label,.ticket-tool-row-v109>button,.ticket-tool-row-v109 .ticket-emoji-wrap-v109{height:46px!important;min-height:46px!important;font-size:12px!important;padding:0 7px!important}.ticket-tool-row-v109 .ticket-tool-button span{display:none!important}}


/* Phase110 - final compact ticket toolbar, portal menu color and ticket filters */
.ticket-tool-old-hidden{display:none!important;visibility:hidden!important;width:0!important;height:0!important;overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important;}
.ticket-file-input-v110{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;}
.ticket-detail-grid,.portal-ticket-detail-grid,.customer-ticket-detail-grid,.ticket-detail-layout,.cp-ticket-detail-grid,.cp-ticket-conversation-layout,.ticket-admin-detail-grid,.admin-ticket-detail-grid,.ticket-thread-layout,.cp-ticket-thread-layout{display:grid!important;grid-template-columns:minmax(420px,460px) minmax(0,1fr)!important;gap:24px!important;align-items:start!important;overflow:visible!important;}
.ticket-compose-panel,.ticket-reply-panel,.ticket-response-panel,.ticket-message-panel,.ticket-composer-panel,.cp-ticket-compose-panel,.cp-ticket-reply-panel,.cp-ticket-side-panel,.cp-ticket-reply-card,.cp-ticket-compose-card,.ticket-sidebar-card,.ticket-admin-reply-card{min-width:420px!important;max-width:460px!important;width:100%!important;box-sizing:border-box!important;overflow:visible!important;}
.ticket-composer-final-v110,[data-ticket-composer="true"]{overflow:visible!important;box-sizing:border-box!important;}
.ticket-composer-final-v110 textarea,[data-ticket-composer="true"] textarea{width:100%!important;min-height:170px!important;box-sizing:border-box!important;resize:vertical!important;}
.ticket-tool-row-v110{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;max-width:100%!important;margin:12px 0 12px!important;padding:10px!important;box-sizing:border-box!important;border-radius:20px!important;border:1px dashed rgba(148,163,184,.42)!important;background:rgba(248,250,252,.94)!important;overflow:visible!important;direction:rtl!important;}
.ticket-tool-row-v110 .ticket-tool-button-v110,.ticket-tool-row-v110>label,.ticket-tool-row-v110 .ticket-emoji-wrap-v110{flex:1 1 0!important;min-width:118px!important;max-width:145px!important;width:auto!important;height:50px!important;min-height:50px!important;border-radius:16px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:0 12px!important;box-sizing:border-box!important;white-space:nowrap!important;text-decoration:none!important;font-size:14px!important;font-weight:900!important;line-height:1!important;position:relative!important;}
.ticket-tool-row-v110 .ticket-tool-button-v110 .ticket-tool-icon,.ticket-tool-row-v110 .ticket-tool-button-v110 b{display:inline-flex!important;align-items:center!important;color:inherit!important;line-height:1!important;pointer-events:none!important;}
.ticket-tool-attach-v110{background:#0f172a!important;color:#fff!important;border:1px solid rgba(15,23,42,.12)!important;}
.ticket-tool-record-v110{background:#2563eb!important;color:#fff!important;border:1px solid rgba(37,99,235,.18)!important;}
.ticket-tool-emoji-v110{background:#fff!important;color:#0f172a!important;border:1px solid rgba(148,163,184,.42)!important;box-shadow:none!important;}
.ticket-emoji-wrap-v110{background:transparent!important;border:0!important;padding:0!important;overflow:visible!important;}
.ticket-emoji-wrap-v110>.ticket-tool-emoji-v110{width:100%!important;height:100%!important;max-width:none!important;min-width:0!important;}
.ticket-emoji-popover-v110{position:absolute!important;right:0!important;bottom:calc(100% + 10px)!important;width:260px!important;max-width:min(260px,80vw)!important;display:none!important;grid-template-columns:repeat(6,1fr)!important;gap:7px!important;padding:10px!important;border-radius:18px!important;background:rgba(255,255,255,.98)!important;border:1px solid rgba(148,163,184,.35)!important;box-shadow:0 18px 45px rgba(15,23,42,.22)!important;z-index:9999!important;}
.ticket-emoji-popover-v110.is-open{display:grid!important;}
.ticket-emoji-choice-v110{width:34px!important;height:34px!important;min-width:34px!important;border-radius:12px!important;padding:0!important;font-size:18px!important;line-height:1!important;background:#f8fafc!important;color:#0f172a!important;border:1px solid #e2e8f0!important;box-shadow:none!important;}
.ticket-file-list-v110,[data-ticket-file-list]{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:6px 0 10px!important;}
.ticket-file-chip{display:inline-flex!important;gap:8px!important;align-items:center!important;max-width:100%!important;padding:7px 10px!important;border-radius:999px!important;background:#eff6ff!important;color:#1e3a8a!important;border:1px solid #bfdbfe!important;font-size:12px!important;}
.ticket-file-chip span{max-width:180px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
.ticket-tool-record-v110.is-recording{background:#dc2626!important;color:#fff!important;}
.ticket-record-status-v110{display:block!important;min-height:20px!important;margin:4px 0 8px!important;color:#64748b!important;font-size:12px!important;text-align:center!important;}
/* Remove accidental older duplicated rows */
.ticket-tool-row-v106,.ticket-tool-row-v107,.ticket-tool-row-v108,.ticket-tool-row-v109,.ticket-emoji-popover-v109,.ticket-emoji-wrap-v109{display:none!important;}
/* Customer portal sidebar disabled items must keep menu style, not white/faded blocks */
.cp-sidebar a,.cp-sidebar button,.customer-portal-sidebar a,.customer-portal-sidebar button,.portal-sidebar a,.portal-sidebar button,.cp-menu a,.cp-menu button{opacity:1!important;color:#fff!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.12)!important;}
.cp-sidebar a[aria-disabled="true"],.cp-sidebar .disabled,.customer-portal-sidebar a[aria-disabled="true"],.customer-portal-sidebar .disabled,.portal-sidebar a[aria-disabled="true"],.portal-sidebar .disabled,.cp-menu a[aria-disabled="true"],.cp-menu .disabled{opacity:.72!important;color:#e2e8f0!important;background:rgba(15,23,42,.35)!important;border-color:rgba(255,255,255,.10)!important;filter:none!important;}
.cp-sidebar a.active,.customer-portal-sidebar a.active,.portal-sidebar a.active,.cp-menu a.active{background:linear-gradient(135deg,rgba(20,184,166,.30),rgba(14,165,233,.22))!important;border-color:rgba(45,212,191,.42)!important;}
/* Ticket filters: compact apply/clear buttons and readable selects */
.ticket-filter-panel .btn,.ticket-filter-panel button,.ticket-filters .btn,.ticket-filters button,.ticket-filter-bar .btn,.ticket-filter-bar button,.admin-ticket-filter .btn,.admin-ticket-filter button{height:46px!important;min-height:46px!important;width:auto!important;min-width:96px!important;max-width:128px!important;padding:0 16px!important;border-radius:14px!important;font-size:14px!important;font-weight:900!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;}
.ticket-filter-panel select,.ticket-filter-panel input,.ticket-filters select,.ticket-filters input,.ticket-filter-bar select,.ticket-filter-bar input,.admin-ticket-filter select,.admin-ticket-filter input{height:42px!important;min-height:42px!important;font-size:14px!important;border-radius:12px!important;box-sizing:border-box!important;}
@media (max-width:1240px){.ticket-detail-grid,.portal-ticket-detail-grid,.customer-ticket-detail-grid,.ticket-detail-layout,.cp-ticket-detail-grid,.cp-ticket-conversation-layout,.ticket-admin-detail-grid,.admin-ticket-detail-grid,.ticket-thread-layout,.cp-ticket-thread-layout{grid-template-columns:1fr!important}.ticket-compose-panel,.ticket-reply-panel,.ticket-response-panel,.ticket-message-panel,.ticket-composer-panel,.cp-ticket-compose-panel,.cp-ticket-reply-panel,.cp-ticket-side-panel,.cp-ticket-reply-card,.cp-ticket-compose-card,.ticket-sidebar-card,.ticket-admin-reply-card{min-width:0!important;max-width:100%!important}}
@media (max-width:560px){.ticket-tool-row-v110{gap:6px!important;padding:8px!important}.ticket-tool-row-v110 .ticket-tool-button-v110,.ticket-tool-row-v110>label,.ticket-tool-row-v110 .ticket-emoji-wrap-v110{min-width:0!important;max-width:none!important;height:46px!important;min-height:46px!important;font-size:12px!important;padding:0 8px!important}.ticket-tool-row-v110 .ticket-tool-icon{display:none!important}.ticket-emoji-popover-v110{right:auto!important;left:0!important;width:230px!important}}

/* Phase112 - customer portal sidebar bottom color polish and ticket list readability. */
.cp-sidebar{
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-bottom:max(26px, env(safe-area-inset-bottom))!important;
    background:linear-gradient(180deg,#102033 0%,#0f172a 58%,#08111f 100%)!important;
    scrollbar-width:thin;
    scrollbar-color:rgba(125,211,252,.35) transparent;
}
.cp-sidebar::-webkit-scrollbar{width:7px!important;}
.cp-sidebar::-webkit-scrollbar-thumb{background:rgba(125,211,252,.32)!important;border-radius:999px!important;}
.cp-sidebar::-webkit-scrollbar-track{background:transparent!important;}
.cp-nav-v99{padding-bottom:10px!important;}
.cp-nav-v99 .cp-nav-item,
.cp-sidebar .cp-nav-v99 .cp-nav-item,
.cp-sidebar .cp-nav-v99 a.cp-nav-item{
    opacity:1!important;
    color:#f8fafc!important;
    background:linear-gradient(135deg,rgba(20,184,166,.22),rgba(15,23,42,.42))!important;
    border:1px solid rgba(125,211,252,.20)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 10px 24px rgba(2,6,23,.12)!important;
    filter:none!important;
}
.cp-nav-v99 .cp-nav-item:hover{
    background:linear-gradient(135deg,rgba(20,184,166,.32),rgba(37,99,235,.24))!important;
    border-color:rgba(125,211,252,.42)!important;
}
.cp-nav-v99 .cp-nav-primary,
.cp-sidebar .cp-nav-v99 .cp-nav-primary{
    background:linear-gradient(135deg,rgba(37,99,235,.95),rgba(14,165,233,.88))!important;
    border-color:rgba(147,197,253,.40)!important;
}
.cp-nav-v99 .cp-nav-accent,
.cp-sidebar .cp-nav-v99 .cp-nav-accent{
    background:linear-gradient(135deg,rgba(20,184,166,.36),rgba(37,99,235,.24))!important;
    border-color:rgba(45,212,191,.42)!important;
}
.cp-nav-v99 .cp-nav-item[aria-disabled="true"],
.cp-nav-v99 .cp-nav-item.disabled,
.cp-sidebar .cp-nav-v99 .cp-nav-item[aria-disabled="true"],
.cp-sidebar .cp-nav-v99 .cp-nav-item.disabled{
    opacity:.96!important;
    color:#e5eefc!important;
    background:linear-gradient(135deg,rgba(15,118,110,.24),rgba(15,23,42,.50))!important;
    border-color:rgba(125,211,252,.20)!important;
}
.cp-nav-v99 .cp-nav-item b{color:#fff!important;}
.cp-nav-v99 .cp-nav-item small{color:#cbd5e1!important;}
@media(max-height:820px) and (min-width:861px){
    .cp-sidebar{padding-top:14px!important;}
    .cp-brand{margin-bottom:12px!important;}
    .cp-nav-v99{gap:.42rem!important;}
    .cp-nav-v99 .cp-nav-item{padding:.66rem .72rem!important;border-radius:16px!important;}
    .cp-nav-v99 .cp-nav-icon{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:12px!important;}
    .cp-nav-v99 .cp-nav-item b{font-size:.86rem!important;}
    .cp-nav-v99 .cp-nav-item small{font-size:.68rem!important;}
}


/* Phase113 - customer portal dashboard/menu final cleanup */
.cp-nav-v99 .cp-nav-label{display:none!important;}
.cp-nav-v99{gap:.52rem!important;}
.cp-sidebar .cp-nav-v99 .cp-nav-item{min-height:64px!important;}
.cp-dashboard-panels-v98 .cp-ticket-list.compact,
.cp-dashboard-panels-v98 .cp-doc-list{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
}
.cp-dashboard-panels-v98 .cp-ticket-item,
.cp-dashboard-panels-v98 .cp-doc-item,
.cp-dashboard-panels-v98 .cp-doc-link-v97{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    padding:12px 14px!important;
    margin:0!important;
    border:1px solid rgba(148,163,184,.22)!important;
    border-radius:16px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.86))!important;
    box-shadow:0 10px 24px rgba(15,23,42,.045)!important;
    text-decoration:none!important;
    color:#0f172a!important;
}
.cp-dashboard-panels-v98 .cp-ticket-item:hover,
.cp-dashboard-panels-v98 .cp-doc-item:hover,
.cp-dashboard-panels-v98 .cp-doc-link-v97:hover{
    border-color:rgba(20,184,166,.38)!important;
    box-shadow:0 14px 30px rgba(20,184,166,.08)!important;
    transform:translateY(-1px)!important;
}
.cp-dashboard-panels-v98 .cp-ticket-item strong,
.cp-dashboard-panels-v98 .cp-doc-item strong{
    font-size:15px!important;
    font-weight:900!important;
    line-height:1.8!important;
    color:#0f172a!important;
}
.cp-dashboard-panels-v98 .cp-ticket-item span,
.cp-dashboard-panels-v98 .cp-doc-item span{
    color:#475569!important;
    font-size:13px!important;
    line-height:1.7!important;
    overflow-wrap:anywhere!important;
}
.cp-dashboard-panels-v98 .cp-ticket-item small,
.cp-dashboard-panels-v98 .cp-doc-item small{
    color:#64748b!important;
    font-size:12px!important;
    line-height:1.7!important;
}
.cp-dashboard-card-grid-v98{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;}

/* Phase114 - customer portal speed/mobile/PWA polish */
.cp-dashboard-card-grid-v98{
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
    gap:12px!important;
    margin:14px 0!important;
}
.cp-dashboard-action-card-v98{
    min-height:132px!important;
    padding:14px!important;
    border-radius:20px!important;
    box-shadow:0 10px 26px rgba(15,23,42,.055)!important;
    contain:layout paint;
}
.cp-dashboard-action-card-v98:hover{
    transform:translateY(-1px)!important;
    box-shadow:0 14px 30px rgba(37,99,235,.085)!important;
}
.cp-card-icon-v98{width:38px!important;height:38px!important;border-radius:14px!important;font-size:18px!important;}
.cp-dashboard-action-card-v98 em{font-size:24px!important;}
.cp-dashboard-panels-v98{gap:12px!important;}
.cp-dashboard-panels-v98>.cp-panel{min-height:0!important;content-visibility:auto;contain-intrinsic-size:1px 320px;}
.cp-dashboard-panels-v98 .cp-ticket-list.compact,
.cp-dashboard-panels-v98 .cp-doc-list{gap:8px!important;}
.cp-dashboard-panels-v98 .cp-ticket-item,
.cp-dashboard-panels-v98 .cp-doc-item,
.cp-dashboard-panels-v98 .cp-doc-link-v97{padding:10px 12px!important;border-radius:14px!important;box-shadow:0 6px 16px rgba(15,23,42,.035)!important;}
.cp-dashboard-panels-v98 .cp-ticket-item strong,
.cp-dashboard-panels-v98 .cp-doc-item strong{font-size:14px!important;line-height:1.65!important;}
.cp-dashboard-panels-v98 .cp-ticket-item span,
.cp-dashboard-panels-v98 .cp-doc-item span{font-size:12.5px!important;line-height:1.55!important;}
.cp-dashboard-hero-v98{padding:18px!important;margin-bottom:14px!important;border-radius:24px!important;}
.cp-dashboard-logo-v98{width:76px!important;height:76px!important;border-radius:22px!important;}

@media(max-width:1050px){
    .cp-shell{display:block!important;min-height:100vh!important;}
    .cp-sidebar{position:relative!important;height:auto!important;max-height:none!important;border-radius:0 0 24px 24px!important;padding:14px!important;gap:12px!important;}
    .cp-sidebar .cp-brand{min-height:64px!important;margin:0!important;}
    .cp-nav-v99{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding-bottom:2px!important;}
    .cp-sidebar .cp-nav-v99 .cp-nav-item{min-height:58px!important;padding:9px 10px!important;border-radius:15px!important;}
    .cp-nav-v99 .cp-nav-icon{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:12px!important;}
    .cp-nav-v99 .cp-nav-item b{font-size:.84rem!important;}
    .cp-nav-v99 .cp-nav-item small{font-size:.66rem!important;line-height:1.35!important;}
    .cp-sidebar-footer{display:none!important;}
    .cp-main{padding:14px!important;}
}

@media(max-width:760px){
    body.customer-portal-body{background:#eef4fb!important;overflow-x:hidden!important;}
    .cp-topbar-v98{margin-bottom:12px!important;}
    .cp-user-box-v98{padding:10px!important;border-radius:20px!important;gap:10px!important;}
    .cp-user-profile-link-v98{width:100%!important;justify-content:flex-start!important;}
    .cp-welcome-time-v98{padding:8px 10px!important;border-radius:16px!important;gap:8px!important;}
    .cp-welcome-time-v98 strong,.cp-welcome-time-v98 span{font-size:12.5px!important;}
    .cp-welcome-time-v98 b{min-width:74px!important;padding:6px 8px!important;font-size:12.5px!important;}
    .cp-dashboard-hero-v98{padding:14px!important;border-radius:20px!important;}
    .cp-dashboard-logo-v98{width:62px!important;height:62px!important;border-radius:18px!important;}
    .cp-dashboard-tags-v96{gap:6px!important;}
    .cp-dashboard-tags-v96 span{padding:5px 8px!important;font-size:11px!important;}
    .cp-dashboard-card-grid-v98{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
    .cp-dashboard-action-card-v98{min-height:118px!important;padding:12px!important;gap:5px!important;}
    .cp-card-icon-v98{width:34px!important;height:34px!important;font-size:17px!important;}
    .cp-dashboard-action-card-v98 strong{font-size:13.5px!important;line-height:1.55!important;}
    .cp-dashboard-action-card-v98 em{font-size:21px!important;}
    .cp-dashboard-action-card-v98 small{font-size:11.5px!important;line-height:1.5!important;}
    .cp-dashboard-panels-v98{grid-template-columns:1fr!important;}
}

@media(max-width:430px){
    .cp-main{padding:10px!important;}
    .cp-sidebar{padding:10px!important;border-radius:0 0 20px 20px!important;}
    .cp-nav-v99{grid-template-columns:1fr!important;}
    .cp-sidebar .cp-nav-v99 .cp-nav-item{min-height:54px!important;}
    .cp-dashboard-card-grid-v98{grid-template-columns:1fr!important;}
    .cp-dashboard-action-card-v98{min-height:104px!important;}
    .cp-dashboard-panels-v98 .cp-ticket-item,
    .cp-dashboard-panels-v98 .cp-doc-item,
    .cp-dashboard-panels-v98 .cp-doc-link-v97{padding:9px 10px!important;}
}

/* Phase115 - dashboard six cards: 3 + 3 desktop layout */
.cp-dashboard-card-grid-v98{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:stretch!important;
}
.cp-dashboard-action-card-v98{
    min-width:0!important;
}
@media(max-width:980px){
    .cp-dashboard-card-grid-v98{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:520px){
    .cp-dashboard-card-grid-v98{grid-template-columns:1fr!important;}
}

/* Phase119 - portal dashboard speed and exact 3x2 card layout */
.cp-dashboard-card-grid-v98{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:1fr!important;
    gap:14px!important;
    contain:layout paint style!important;
}
.cp-dashboard-action-card-v98{
    min-height:126px!important;
    transform:none!important;
    transition:box-shadow .15s ease, border-color .15s ease!important;
    will-change:auto!important;
}
.cp-dashboard-action-card-v98:hover{
    transform:none!important;
}
.cp-dashboard-hero-v98,
.cp-dashboard-panels-v98>.cp-panel{
    contain:layout paint!important;
}
@media(max-width:980px){
    .cp-dashboard-card-grid-v98{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:520px){
    .cp-dashboard-card-grid-v98{grid-template-columns:1fr!important;}
}

/* Phase157 - customer portal footer password action polish */
.cp-sidebar-footer{gap:.65rem!important;}
.cp-sidebar-footer .cp-password-action-v157{
    display:flex!important;
    align-items:center;
    gap:.65rem;
    width:100%;
    text-decoration:none;
    border:1px solid rgba(96,165,250,.24);
    border-radius:18px;
    padding:.72rem .82rem;
    background:linear-gradient(135deg,rgba(37,99,235,.16),rgba(14,165,233,.1));
    color:#eaf2ff!important;
    box-shadow:0 12px 26px rgba(15,23,42,.18);
}
.cp-sidebar-footer .cp-password-action-v157 span{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:rgba(255,255,255,.14);
}
.cp-sidebar-footer .cp-password-action-v157 b{font-size:.92rem;}
.cp-sidebar-footer .cp-password-action-v157 small{display:block;color:rgba(226,232,240,.78);font-size:.72rem;margin-top:.1rem;}
.cp-sidebar-footer .cp-password-action-v157:hover{border-color:rgba(125,211,252,.5);background:linear-gradient(135deg,rgba(37,99,235,.24),rgba(14,165,233,.16));}
@media(max-width:900px){.cp-sidebar-footer .cp-password-action-v157{justify-content:center}.cp-sidebar-footer .cp-password-action-v157 small{display:none}}

/* Phase159U - Login media promotional text cleanup
   هدف: حذف نوشته‌های تبلیغاتی روی تصاویر ورود بدون تغییر تصویر اصلی و بدون اثر روی سرعت/PWA. */

/* صفحه ورود کارکنان: حذف کپشن/متن تبلیغاتی روی تصویر */
.compact-auth-page .login-visual-overlay,
.compact-auth-page .login-visual-overlay * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* یک لایه خیلی ملایم برای کم‌رنگ شدن متن‌هایی که داخل خود عکس هستند و با CSS قابل حذف مستقیم نیستند */
.compact-auth-page .login-visual::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.10), rgba(14,165,233,.08)),
        radial-gradient(circle at 72% 42%, rgba(255,255,255,.24), transparent 38%) !important;
}

.compact-auth-page .login-visual .auth-media,
.compact-auth-page .login-visual img,
.compact-auth-page .login-visual video {
    filter: saturate(1.03) contrast(.96) brightness(1.03) !important;
}

/* صفحه ورود پورتال مشتریان: حذف کپشن/متن تبلیغاتی پایین تصویر */
.cp-auth-photo-caption-v97,
.cp-auth-photo-caption-v96,
.cp-auth-photo-caption,
.cp-auth-photo-caption-v97 *,
.cp-auth-photo-caption-v96 *,
.cp-auth-photo-caption * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* کم‌رنگ کردن نوشته‌هایی که ممکن است داخل خود تصویر پورتال باشند */
.cp-auth-photo-v96::before,
.cp-auth-photo-v95::before,
.cp-auth-photo::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.16), rgba(15,23,42,.06)),
        radial-gradient(circle at 72% 44%, rgba(255,255,255,.22), transparent 40%) !important;
}

.cp-auth-photo-v96 .cp-auth-media,
.cp-auth-photo-v95 .cp-auth-media,
.cp-auth-photo .cp-auth-media {
    filter: saturate(1.02) contrast(.95) brightness(1.04) !important;
}

@media (max-width: 760px) {
    .compact-auth-page .login-visual::before,
    .cp-auth-photo-v96::before,
    .cp-auth-photo-v95::before,
    .cp-auth-photo::before {
        background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(14,165,233,.07)) !important;
    }
}

/* Phase159X - Preserve multiline text exactly as users typed it across CRM writing boxes */
:where(
  .op-description,
  .op-activity-item > p,
  .op-activity-item p,
  .op-reply-box p,
  .op-referral-replies p,
  .op-referral-status,
  .task-description,
  .task-report-card p,
  .task-report-item p,
  .task-referral-card p,
  .task-referral-item p,
  .task-referral-reply p,
  .task-referral-message p,
  .referral-message-block p,
  .tasks-referral-preview p,
  .tasks-latest-message p,
  .engineering-referral-description,
  .engineering-reply-row p,
  .engineering-history-detail p,
  .engineering-history-detail .periodic-summary-text,
  .engineering-history-detail .periodic-actions-text,
  .engineering-history-detail td,
  .engineering-project-summary-grid p,
  .engineering-project-summary-grid div,
  .engineering-card p,
  .engineering-card td,
  .engineering-card .report-readonly-text,
  .engineering-card .report-manager-note,
  .report-readonly-text,
  .report-manager-note,
  .periodic-raw-text,
  .periodic-summary-text,
  .periodic-actions-text,
  .deliverable-note p,
  .summary p,
  .execution-work-note,
  .execution-report-history p,
  .execution-report-history td,
  .execution-item-description,
  .execution-item-report-text,
  .customer-portal-document-description,
  .customer-portal-description,
  .portal-document-description,
  .portal-ticket-message,
  .portal-ticket-reply,
  .portal-service-description,
  .portal-project-description,
  .portal-chat-message,
  .message-text,
  .chat-message-text,
  .admin-document-body,
  .administrative-document-body,
  .product-delivery-description,
  .product-delivery-note,
  .product-delivery-body,
  [data-multiline-text]
) {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 2.05 !important;
    unicode-bidi: plaintext;
}

:where(
  p[class*="description"], div[class*="description"], span[class*="description"], td[class*="description"],
  p[class*="report"], div[class*="report-text"], span[class*="report-text"], td[class*="report"],
  p[class*="referral"], div[class*="referral-description"], div[class*="referral-message"], span[class*="referral-message"],
  p[class*="reply"], div[class*="reply-text"], span[class*="reply-text"],
  p[class*="summary"], div[class*="summary-text"], span[class*="summary-text"],
  p[class*="scope"], div[class*="scope"], span[class*="scope"],
  p[class*="deliverable"], div[class*="deliverable-note"],
  p[class*="risk"], div[class*="risk"],
  p[class*="note"], div[class*="note-text"], span[class*="note-text"],
  p[class*="message"], div[class*="message-text"], span[class*="message-text"]
):not(input):not(textarea):not(select):not(button) {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 2.05 !important;
    unicode-bidi: plaintext;
}

:where(
  .op-description,
  .op-activity-item > p,
  .task-description,
  .task-report-item p,
  .task-referral-item p,
  .task-referral-reply p,
  .engineering-referral-description,
  .engineering-reply-row p,
  .report-readonly-text,
  .deliverable-note p,
  .summary p
) {
    display: block !important;
    margin-top: .65rem !important;
    margin-bottom: .65rem !important;
}

/* Phase160H42 - Customer portal login visual fit, mobile, and PWA polish */
.customer-portal-login-body.cp-login-v96 {
    min-height: 100svh !important;
    padding: clamp(12px, 2vh, 22px) !important;
    overflow-x: hidden !important;
    background:
        radial-gradient(circle at 82% 12%, rgba(20, 184, 166, .18), transparent 34%),
        radial-gradient(circle at 8% 12%, rgba(37, 99, 235, .14), transparent 30%),
        linear-gradient(135deg, #f4f8ff 0%, #f8fbff 48%, #eef7ff 100%) !important;
}

.cp-auth-shell-v96 {
    width: min(1240px, 100%) !important;
    min-height: min(760px, calc(100svh - 44px)) !important;
    grid-template-columns: minmax(390px, .9fr) minmax(0, 1.1fr) !important;
    gap: clamp(16px, 2vw, 24px) !important;
    align-items: stretch !important;
}

.cp-auth-card-v96 {
    border-radius: 34px !important;
    padding: clamp(28px, 4vw, 44px) clamp(24px, 3.4vw, 40px) !important;
    box-shadow: 0 28px 75px rgba(15, 23, 42, .12) !important;
    background: rgba(255, 255, 255, .965) !important;
}

.cp-auth-photo-v96,
.cp-auth-photo-v95,
.cp-auth-photo {
    min-height: min(760px, calc(100svh - 44px)) !important;
    border-radius: 34px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.06), rgba(15,23,42,.04)),
        url('/img/customer-portal/customer-portal-login.webp') center center / cover no-repeat !important;
    box-shadow: 0 28px 75px rgba(15, 23, 42, .14) !important;
    border: 1px solid rgba(255,255,255,.75) !important;
    overflow: hidden !important;
    isolation: isolate !important;
}

.cp-auth-photo-v96::before,
.cp-auth-photo-v95::before,
.cp-auth-photo::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.015), rgba(15,23,42,.025)),
        radial-gradient(circle at 74% 42%, rgba(255,255,255,.09), transparent 40%) !important;
}

.cp-auth-photo-v96::after,
.cp-auth-photo-v95::after,
.cp-auth-photo::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    pointer-events: none !important;
    background: linear-gradient(180deg, rgba(15,23,42,.015), rgba(15,23,42,.055)) !important;
}

.cp-auth-photo-v96 .cp-auth-media,
.cp-auth-photo-v95 .cp-auth-media,
.cp-auth-photo .cp-auth-media,
.cp-auth-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    filter: saturate(1.04) contrast(1.01) brightness(1.02) !important;
    z-index: 0 !important;
    background: #f2eee6 !important;
}

.cp-auth-photo-caption-v97,
.cp-auth-photo-caption-v96,
.cp-auth-photo-caption,
.cp-auth-photo-caption-v97 *,
.cp-auth-photo-caption-v96 *,
.cp-auth-photo-caption * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.cp-auth-brand-v96 h1 {
    letter-spacing: -.025em !important;
}

.cp-field-v96 input,
.cp-captcha-mainlike-v96 input {
    font-size: 16px !important;
}

@media (display-mode: standalone) {
    .customer-portal-login-body.cp-login-v96 {
        min-height: 100dvh !important;
        padding-top: max(12px, env(safe-area-inset-top)) !important;
        padding-right: max(12px, env(safe-area-inset-right)) !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        padding-left: max(12px, env(safe-area-inset-left)) !important;
    }
}

@media (max-width: 1100px) {
    .cp-auth-shell-v96 {
        width: min(760px, 100%) !important;
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .cp-auth-photo-v96,
    .cp-auth-photo-v95,
    .cp-auth-photo {
        order: 1 !important;
        min-height: clamp(300px, 48vw, 430px) !important;
        border-radius: 28px !important;
    }

    .cp-auth-card-v96 {
        order: 2 !important;
        border-radius: 28px !important;
    }
}

@media (max-width: 760px) {
    .customer-portal-login-body.cp-login-v96 {
        place-items: start center !important;
        padding: 10px !important;
        overflow-y: auto !important;
    }

    .cp-auth-shell-v96 {
        gap: 12px !important;
    }

    .cp-auth-photo-v96,
    .cp-auth-photo-v95,
    .cp-auth-photo {
        min-height: 260px !important;
        border-radius: 24px !important;
    }

    .cp-auth-photo-v96 .cp-auth-media,
    .cp-auth-photo-v95 .cp-auth-media,
    .cp-auth-photo .cp-auth-media,
    .cp-auth-media {
        object-position: center 54% !important;
    }

    .cp-auth-card-v96 {
        padding: 22px 16px !important;
        border-radius: 24px !important;
    }
}

@media (max-width: 430px) {
    .cp-auth-photo-v96,
    .cp-auth-photo-v95,
    .cp-auth-photo {
        min-height: 220px !important;
    }
}
