.notice{display:flex;align-items:center;justify-content:space-between;gap:12px}.notice-dismiss{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--text);font-size:18px;line-height:1}.ticket-close-form{margin:0}.ticket-close-form .button{white-space:nowrap}
html{touch-action:manipulation}:root{--bg:#f5f5f5;--surface:#fff;--surface-2:#fafafa;--text:#111;--muted:#6a6a6a;--line:#dedede;--line-strong:#b9b9b9;--inverse:#fff;--accent:#111;--success:#1e1e1e;--danger:#313131;--radius:14px;--shadow:0 18px 60px rgba(0,0,0,.07);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:light}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{font-size:15px;line-height:1.5}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}.portal-shell{min-height:100vh;display:grid;grid-template-columns:252px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;padding:28px 20px 22px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{display:flex;align-items:center;min-height:48px}.brand img,.auth-brand img{display:block;width:142px;height:44px;object-fit:contain}.logo-pair{display:block;position:relative;width:142px;height:44px}.logo-pair .logo-dark{display:none}[data-theme="dark"] .logo-pair .logo-light{display:none}[data-theme="dark"] .logo-pair .logo-dark{display:block}@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .logo-pair .logo-light{display:none}:root:not([data-theme="light"]) .logo-pair .logo-dark{display:block}}.portal-name{margin:24px 10px 12px;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.sidebar nav{display:grid;gap:5px}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border:1px solid transparent;border-radius:10px;color:var(--muted);font-weight:560}.sidebar nav a:hover,.sidebar nav a.active{background:var(--text);color:var(--inverse)}.sidebar-footer{margin-top:auto;padding:16px 12px 0;border-top:1px solid var(--line)}.logout-button{padding:0;border:0;background:transparent;color:var(--muted);text-align:left}.logout-button:hover{color:var(--text)}.workspace{min-width:0}.topbar{height:76px;padding:0 clamp(20px,4vw,54px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;gap:16px;background:color-mix(in srgb,var(--bg) 90%,transparent);position:sticky;top:0;z-index:20;backdrop-filter:blur(14px)}.topbar-user{display:grid;text-align:right}.topbar-user span{font-weight:650}.topbar-user small{color:var(--muted)}.theme-toggle{width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:var(--surface)}.mobile-nav{display:none;margin-right:auto;position:relative}.mobile-nav summary{list-style:none;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-weight:600;cursor:pointer}.mobile-nav summary::-webkit-details-marker{display:none}.mobile-panel{position:absolute;top:48px;left:0;width:230px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);display:grid;gap:4px}.mobile-panel a,.mobile-panel .logout-button{width:100%;padding:10px;border-radius:8px}.mobile-panel a:hover,.mobile-panel .logout-button:hover{background:var(--surface-2)}.content{width:min(1500px,100%);margin:0 auto;padding:42px clamp(20px,4vw,54px) 80px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}.page-heading p,.auth-heading p{margin:0 0 6px;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.13em;text-transform:uppercase}.page-heading h1{margin:0;font-size:clamp(28px,4vw,42px);line-height:1.1;letter-spacing:-.04em}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:24px}.stat,.card,.table-card,.empty-state,.form-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.stat{padding:20px}.stat span{display:block;color:var(--muted);font-size:13px}.stat strong{display:block;margin-top:8px;font-size:30px;letter-spacing:-.04em}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card,.form-card{padding:24px}.card h2,.form-card h2,.empty-state h2{margin:0 0 8px;font-size:18px}.card p,.empty-state p{margin:0;color:var(--muted)}.card-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border:1px solid var(--text);border-radius:9px;background:var(--text);color:var(--inverse);font-weight:650}.button.secondary{background:transparent;color:var(--text);border-color:var(--line-strong)}.button.danger{background:transparent;color:var(--text);border-color:var(--text)}.button.small{min-height:34px;padding:6px 11px;font-size:13px}.button:hover{opacity:.8}.notice{margin:0 0 20px;padding:13px 15px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface)}.notice-success{border-color:#77c48a;background:#eaf8ee;color:#126b2d}.notice-error{border-color:#e08b8b;border-style:solid;background:#fff0f0;color:#a51f1f}.notice-warning{border-color:#d9b94c;background:#fff8d8;color:#735600}.notice-info{border-color:#80acd9;background:#edf6ff;color:#1e5f99}[data-theme="dark"] .notice-success{border-color:#2f7f48;background:#102f1a;color:#79d796}[data-theme="dark"] .notice-error{border-color:#8d3a3a;background:#321414;color:#ff9999}[data-theme="dark"] .notice-warning{border-color:#80671e;background:#332a0c;color:#f0cf63}[data-theme="dark"] .notice-info{border-color:#315f89;background:#10283d;color:#8bc7fa}.table-card{overflow:hidden}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}th{color:var(--muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase;background:var(--surface-2)}tbody tr:last-child td{border-bottom:0}.badge{display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border:1px solid var(--line-strong);border-radius:999px;font-size:12px;white-space:nowrap}.badge-active,.badge-paid,.badge-resolved{background:var(--text);color:var(--inverse);border-color:var(--text)}.badge-suspended,.badge-high,.badge-failed{border-style:dashed}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:650}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);padding:11px 12px;outline:none}.field textarea{min-height:128px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--text);box-shadow:0 0 0 2px color-mix(in srgb,var(--text) 12%,transparent)}.form-actions{display:flex;gap:10px;align-items:center;margin-top:20px}.empty-state{padding:58px 24px;text-align:center}.empty-icon{display:grid;place-items:center;width:42px;height:42px;margin:0 auto 16px;border:1px solid var(--line-strong);border-radius:50%;font-size:24px}.empty-state .button{margin-top:20px}.auth-page{min-height:100dvh;display:grid;place-items:center;padding:30px;background:var(--bg)}.auth-shell{width:min(440px,100%);display:grid;justify-items:stretch}.auth-brand{display:flex;justify-content:center;margin-bottom:28px}.auth-card{padding:34px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.auth-heading{text-align:center;margin-bottom:24px}.auth-heading h1{margin:0 0 8px;font-size:30px;letter-spacing:-.04em}.auth-heading span{color:var(--muted)}.auth-card form{display:grid;gap:15px}.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:20px;font-size:13px}.auth-back{text-align:center;color:var(--muted);font-size:13px}.ticket-thread{display:grid;gap:12px}.message{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.message header{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.message p{margin:0;white-space:pre-wrap}.message.internal{border-style:dashed}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.filters{display:flex;gap:10px;flex-wrap:wrap}.muted{color:var(--muted)}.detail-list{display:grid;gap:12px}.detail-row{display:flex;justify-content:space-between;gap:20px;padding-bottom:12px;border-bottom:1px solid var(--line)}.detail-row:last-child{border-bottom:0}.inline-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.inline-form select{padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.mt-14{margin-top:14px}.mt-18{margin-top:18px}.mt-24{margin-top:24px}.checkbox-line{display:flex;gap:8px;margin-top:12px}
[data-theme="dark"]{--bg:#0b0b0b;--surface:#121212;--surface-2:#181818;--text:#f4f4f4;--muted:#a7a7a7;--line:#2c2c2c;--line-strong:#555;--inverse:#090909;--accent:#f4f4f4;--shadow:0 18px 60px rgba(0,0,0,.42);color-scheme:dark}[data-theme="dark"] picture img{filter:none}@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#0b0b0b;--surface:#121212;--surface-2:#181818;--text:#f4f4f4;--muted:#a7a7a7;--line:#2c2c2c;--line-strong:#555;--inverse:#090909;--accent:#f4f4f4;--shadow:0 18px 60px rgba(0,0,0,.42);color-scheme:dark}}
.nav-icon{width:19px;height:19px;flex:0 0 auto}.nav-group{display:block;padding:17px 12px 6px;color:var(--muted);font-size:10px;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.status-dot{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:currentColor}.badge-active{color:#16803c}.badge-inactive,.badge-cancelled{color:#c33232}.badge-suspended{color:#c58a00}.client-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-top:18px}.pagination{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:24px 0}.pagination a{min-width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:var(--surface);transition:background-color .18s ease,color .18s ease}.pagination a:hover,.pagination a.active{background:var(--text);color:var(--inverse)}.button.danger{border-color:#c33232;color:#c33232}.button.danger:hover{background:#c33232;color:#fff}.sidebar nav a,.mobile-panel a,.button,.card{transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease}.card:hover{transform:translateY(-2px)}
.message-role-client{border-color:#b7d3f4;background:#edf5ff}.message-role-admin{border-color:#a9d8bc;background:#eef9f2}.message-role-label{display:inline-flex;margin-left:8px;padding:2px 7px;border:1px solid currentColor;border-radius:999px;font-size:10px;font-weight:750;letter-spacing:.04em;vertical-align:middle}.message-role-client .message-role-label{color:#245f9e}.message-role-admin .message-role-label{color:#237545}[data-theme="dark"] .message-role-client{border-color:#315b86;background:#12263a}[data-theme="dark"] .message-role-admin{border-color:#326748;background:#122b1d}[data-theme="dark"] .message-role-client .message-role-label{color:#8fc5ff}[data-theme="dark"] .message-role-admin .message-role-label{color:#8be0aa}
@media(max-width:900px){.portal-shell{display:block}.sidebar{display:none}.topbar{justify-content:flex-end}.mobile-nav{display:block}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.content{padding-top:30px}}
.badge-active{background:#edf8f0;color:#16803c;border-color:#9fd7ae}.logout-button{width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--text);display:flex;align-items:center;gap:10px;font-weight:650;text-align:left;transition:background-color .18s ease,border-color .18s ease,transform .18s ease}.logout-button:hover{background:var(--text);color:var(--inverse);border-color:var(--text);transform:translateY(-1px)}.badge-used{background:#edf5ff;color:#155eaa;border-color:#99bfe8}.badge-revoked{background:#fff2f2;color:#b42323;border-color:#e8aaaa}.badge-inactive,.badge-cancelled{background:#fff2f2}.badge-suspended{background:#fff8e6}[data-theme="dark"] .badge-active{background:#12341e;color:#6dd58c;border-color:#286b3c}[data-theme="dark"] .badge-used{background:#12283d;color:#9bcbf5;border-color:#2e5d86}[data-theme="dark"] .badge-revoked{background:#381818;color:#ff9999;border-color:#7e3030}[data-theme="dark"] .badge-inactive,[data-theme="dark"] .badge-cancelled{background:#381818}[data-theme="dark"] .badge-suspended{background:#3a2b0b}
.badge-pending{background:#f6f2e8;color:#8a6200;border-color:#d9c58b}.badge-overdue{background:#fff2f2;color:#c33232;border-color:#e0a1a1}[data-theme="dark"] .badge-pending{background:#332b16;color:#e6c76c}[data-theme="dark"] .badge-overdue{background:#381818;color:#ef8d8d}
.badge-paused{background:#fff8e6;color:#9a6900;border-color:#dfbf67}.badge-past_due{background:#fff2f2;color:#c33232;border-color:#e0a1a1}.badge-paid{background:#edf8f0;color:#16803c;border-color:#9fd7ae}[data-theme="dark"] .badge-paused{background:#3a2b0b;color:#edc75f;border-color:#80621f}[data-theme="dark"] .badge-past_due{background:#381818;color:#ef8d8d;border-color:#7a3030}[data-theme="dark"] .badge-paid{background:#12341e;color:#6dd58c;border-color:#286b3c}
.badge-low,.badge-resolved{color:#14783a;background:#edf8f0;border-color:#9fd7ae}.badge-medium,.badge-in_progress,.badge-waiting_client{color:#996400;background:#fff8e5;border-color:#eccb78}.badge-high{color:#b3261e;background:#fff1f0;border-color:#efaaa5}.badge-new{color:#155eaa;background:#edf5ff;border-color:#99bfe8}.badge-client_replied{color:#6c3bb4;background:#f5efff;border-color:#c7acec}[data-theme="dark"] .badge-low,[data-theme="dark"] .badge-resolved{background:#12341e;color:#6dd58c;border-color:#286b3c}[data-theme="dark"] .badge-medium,[data-theme="dark"] .badge-in_progress,[data-theme="dark"] .badge-waiting_client{background:#3a2b0b;color:#f0c75e;border-color:#76591e}[data-theme="dark"] .badge-high{background:#381818;color:#ff9999;border-color:#7e3030}[data-theme="dark"] .badge-new{background:#12283d;color:#9bcbf5;border-color:#2e5d86}[data-theme="dark"] .badge-client_replied{background:#281b3d;color:#cdb0fa;border-color:#5b3d87}.badge-cancellation-scheduled{background:#fff8e6;color:#8a6200;border-color:#d9c58b}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:18px 0}.profile-section-actions{display:flex;justify-content:flex-end;margin-bottom:14px}.subscription-order-modal [hidden]{display:none!important}.host-type-field{padding:0;border:0}.host-type-field legend{margin-bottom:8px;font-weight:700}.segmented-control{display:inline-flex;padding:4px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2)}.segmented-control label{position:relative;cursor:pointer}.segmented-control input{position:absolute;opacity:0}.segmented-control span{display:block;padding:9px 18px;border-radius:8px;color:var(--muted);font-weight:700}.segmented-control input:checked+span{background:var(--text);color:var(--inverse)}.domain-suffix-input{display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);overflow:hidden}.domain-suffix-input input{border:0!important;box-shadow:none!important}.domain-suffix-input span{padding:0 14px;color:var(--muted);white-space:nowrap;border-left:1px solid var(--line)}.modal{width:min(620px,calc(100% - 32px));border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);padding:0;box-shadow:var(--shadow)}.modal::backdrop{background:rgba(0,0,0,.5);backdrop-filter:blur(3px)}.modal-inner{padding:24px}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.modal-header h2{margin:0}.detail-grid .card{display:grid;gap:7px}.detail-grid .card>span{color:var(--muted);font-size:12px}.detail-grid .badge{width:max-content;justify-self:start;align-self:start}.phone-inline{display:grid;grid-template-columns:minmax(180px,220px) minmax(0,1fr);gap:10px}.table-primary-detail{display:block;color:var(--muted)}.ticket-dropzone{display:grid;place-items:center;gap:7px;min-height:130px;margin:16px 0;padding:20px;border:1px dashed var(--line-strong);border-radius:12px;background:var(--surface-2);text-align:center}.ticket-dropzone.dragging{border-color:var(--text);background:var(--surface)}.ticket-dropzone>span{color:var(--muted);font-size:12px}.ticket-attachment-preview,.ticket-message-attachments{display:grid;gap:8px;margin:10px 0}.ticket-attachment-card{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid var(--line);border-radius:10px}.ticket-attachment-open{flex:1;padding:4px;border:0;background:transparent;text-align:left}.ticket-attachment-remove{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.ticket-attachment-link{display:block;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.attachment-preview-dialog{width:min(850px,calc(100% - 32px));height:min(720px,calc(100% - 32px));padding:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text)}.attachment-preview-dialog::backdrop{background:rgba(0,0,0,.65)}.attachment-preview-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line)}.attachment-preview-content{height:calc(100% - 58px);display:grid;place-items:center;padding:14px}.attachment-preview-content img,.attachment-preview-content iframe{width:100%;height:100%;object-fit:contain;border:0}.icon-button{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
@media(min-width:621px){.client-subscriptions-table th:nth-child(n+2),.client-subscriptions-table td:nth-child(n+2){text-align:center}.client-invoices-table th:nth-child(n+2),.client-invoices-table td:nth-child(n+2){text-align:center}.client-support-table th:nth-child(n+2),.client-support-table td:nth-child(n+2){text-align:center}}
@media(max-width:620px){.phone-inline{grid-template-columns:1fr}.topbar{height:68px;padding:0 16px}.topbar-user{display:none}.content{padding:26px 16px 60px}.stats,.grid,.form-grid{grid-template-columns:1fr}.page-heading{align-items:flex-start;flex-direction:column}.auth-page{padding:18px}.auth-card{padding:25px 20px}.toolbar{align-items:flex-start;flex-direction:column}.table-card{border:0;background:transparent}.table-wrap{overflow:visible}table,thead,tbody,tr,th,td{display:block}thead{display:none}tbody{display:grid;gap:12px}tbody tr{padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px}tbody td{display:grid;grid-template-columns:115px 1fr;gap:10px;padding:8px 0;border:0}tbody td::before{content:attr(data-label);color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.inline-form{align-items:stretch;flex-direction:column}}
.ticket-detail-page{scroll-behavior:smooth}.ticket-detail-workspace{width:100%;min-width:0}.ticket-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.ticket-detail-header h1{margin:5px 0 9px;font-size:clamp(22px,2vw,30px);line-height:1.18}.ticket-back-link,.ticket-conversation-header a,.ticket-composer-heading a{color:var(--muted);font-size:13px;font-weight:700}.ticket-back-link:hover,.ticket-conversation-header a:hover,.ticket-composer-heading a:hover{color:var(--text)}.ticket-header-badges{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.ticket-conversation-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;align-items:start;gap:18px}.ticket-conversation-panel{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 10px 34px rgba(0,0,0,.04)}.ticket-conversation-header,.ticket-composer-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.ticket-conversation-header{padding:13px 16px;border-bottom:1px solid var(--line);background:var(--surface-2)}.ticket-conversation-header h2,.ticket-composer-heading h2,.ticket-sidebar-card h2{margin:0}.ticket-conversation-header h2{font-size:17px}.ticket-conversation-header span{display:block;color:var(--muted);font-size:12px}.ticket-thread-scroll{display:grid;gap:10px;max-height:clamp(360px,55vh,650px);padding:16px;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:smooth;scroll-padding:16px}.ticket-thread-scroll .message{width:min(82%,720px);margin:0;padding:11px 13px;border:1px solid var(--line);border-radius:14px;box-shadow:none;scroll-margin:14px}.ticket-thread-scroll .message-role-client{justify-self:start}.ticket-thread-scroll .message-role-admin{justify-self:end}.ticket-thread-scroll .message header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.ticket-thread-scroll .message header>strong{min-width:0}.ticket-thread-scroll .message header>.muted{white-space:nowrap;font-size:11px}.ticket-thread-scroll .message p{margin:7px 0 0;overflow-wrap:anywhere;line-height:1.48}.ticket-message-attachments,.message-attachments{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.ticket-attachment-link{font-size:12px}.ticket-inline-composer{padding:15px 16px 16px;border-top:1px solid var(--line);background:var(--surface-2);scroll-margin-top:86px}.ticket-composer-heading{margin-bottom:11px}.ticket-composer-heading h2{font-size:17px}.ticket-inline-composer textarea{min-height:96px;resize:vertical}.ticket-inline-composer .ticket-dropzone{min-height:74px;margin:10px 0;padding:12px}.ticket-inline-composer .form-actions{margin-top:10px}.ticket-closed-notice{padding:15px 16px;border-top:1px solid var(--line);color:var(--muted);background:var(--surface-2)}.ticket-detail-sidebar{position:sticky;top:84px;display:grid;gap:12px;min-width:0}.ticket-sidebar-card{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.ticket-sidebar-card h2{margin-bottom:11px;font-size:15px}.ticket-sidebar-card dl{display:grid;gap:0;margin:0}.ticket-sidebar-card dl>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--line)}.ticket-sidebar-card dl>div:first-child{padding-top:0;border-top:0}.ticket-sidebar-card dl>div:last-child{padding-bottom:0}.ticket-sidebar-card dt{color:var(--muted);font-size:12px}.ticket-sidebar-card dd{margin:0;text-align:right;font-weight:650}.ticket-sidebar-card .badge{width:max-content}.message-role-client{border-color:#b7d3f4;background:#edf5ff}.message-role-admin{border-color:#a9d8bc;background:#eef9f2}.message-role-admin{justify-self:end}[data-theme="dark"] .ticket-conversation-panel,[data-theme="dark"] .ticket-sidebar-card{box-shadow:none}@media(max-width:1000px){.ticket-conversation-layout{grid-template-columns:1fr}.ticket-detail-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.ticket-detail-header{align-items:stretch;flex-direction:column}.ticket-detail-header>.button{width:100%}.ticket-thread-scroll{max-height:none;padding:12px;overflow:visible}.ticket-thread-scroll .message{width:94%;padding:10px 12px}.ticket-thread-scroll .message header{display:grid;gap:3px}.ticket-thread-scroll .message header>.muted{white-space:normal}.ticket-conversation-header,.ticket-inline-composer{padding-right:12px;padding-left:12px}.ticket-detail-sidebar{grid-template-columns:1fr}.ticket-conversation-header>a{max-width:120px;text-align:right}.ticket-sidebar-card dl>div{align-items:flex-start}.ticket-sidebar-card dd{max-width:65%}}
.client-profile-page{height:calc(100vh - 76px);overflow:hidden;padding-top:24px;padding-bottom:18px}.client-profile-page .page-heading{margin-bottom:12px}.client-profile-page .page-heading h1{font-size:27px}.compact-profile-card{padding:16px 18px}.compact-profile-form .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}.compact-profile-form .field{gap:5px}.compact-profile-form label{font-size:12px}.compact-profile-form input,.compact-profile-form select{height:38px;padding:7px 10px}.compact-profile-form textarea{min-height:54px;height:54px;padding:8px 10px;resize:vertical}.profile-created-row{grid-column:1/-1;width:min(320px,100%);justify-self:start}.profile-phone-field{grid-column:span 2}.compact-profile-form .phone-inline{grid-template-columns:minmax(150px,190px) minmax(0,1fr);gap:8px}.profile-address-field,.profile-billing-field{grid-column:span 1}.profile-billing-toggle{grid-column:1/-1;min-height:24px}.profile-compact-actions{display:flex;align-items:center;gap:9px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.profile-compact-actions .button{min-height:38px;padding:8px 13px}.profile-action-note{margin-right:auto;color:var(--muted);font-size:12px;line-height:1.35}.ticket-detail-page{height:calc(100vh - 76px);overflow:hidden;padding-top:20px;padding-bottom:16px}.ticket-detail-workspace{height:100%;display:flex;min-height:0;flex-direction:column}.ticket-detail-header{flex:0 0 auto;margin-bottom:10px}.ticket-detail-header h1{font-size:clamp(20px,1.7vw,27px)}.ticket-conversation-layout{flex:1;min-height:0}.ticket-conversation-panel{display:flex;min-height:0;flex-direction:column}.ticket-conversation-header{flex:0 0 auto;padding:10px 14px}.ticket-thread-scroll{flex:1;min-height:0;max-height:none;padding:12px 14px;overflow-y:auto}.ticket-thread-scroll .message{padding:9px 11px}.ticket-thread-scroll .message p{margin-top:5px;line-height:1.4}.ticket-inline-composer{flex:0 0 auto;padding:10px 14px 12px}.ticket-composer-heading{margin-bottom:7px}.ticket-inline-composer textarea{min-height:66px;height:66px}.ticket-inline-composer .ticket-dropzone{min-height:54px;margin:7px 0;padding:8px}.ticket-inline-composer .form-actions{margin-top:7px}.ticket-detail-sidebar{max-height:100%;overflow-y:auto}@media(max-width:900px){.client-profile-page{height:auto;overflow:visible}.compact-profile-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-phone-field{grid-column:1/-1}.profile-compact-actions{align-items:stretch;flex-wrap:wrap}.profile-action-note{flex-basis:100%}}@media(max-width:700px){.ticket-detail-page{height:auto;overflow:visible;padding-top:26px;padding-bottom:60px}.ticket-detail-workspace{height:auto}.ticket-conversation-layout{min-height:auto}.ticket-conversation-panel{display:block}.ticket-thread-scroll{max-height:none;overflow:visible}.ticket-detail-sidebar{max-height:none;overflow:visible}.compact-profile-form .form-grid{grid-template-columns:1fr}.profile-phone-field,.profile-created-row,.profile-address-field,.profile-billing-field{grid-column:1}.profile-compact-actions{flex-direction:column}.profile-compact-actions .button{width:100%}.profile-action-note{margin:0;text-align:left}}.ticket-sidebar-attachments{display:grid;gap:7px;padding:11px 12px;border-style:dashed}.ticket-sidebar-attachments h2{margin:0;font-size:14px}.ticket-sidebar-attachments>span{color:var(--muted);font-size:11px;line-height:1.35}.ticket-sidebar-attachments>.button{width:100%;min-height:34px;padding:6px 9px}.ticket-sidebar-attachments.dragging{border-color:var(--accent)}.ticket-sidebar-attachments .ticket-attachment-preview{max-height:92px;overflow-y:auto}.ticket-sidebar-reply-button{width:100%;min-height:42px;justify-content:center}.ticket-thread-scroll{flex:0 1 auto;min-height:0;max-height:clamp(300px,48vh,440px);align-content:start;overflow-y:auto}@media(max-width:700px){.ticket-thread-scroll{min-height:0;max-height:52vh;align-content:start;overflow-y:auto}}

.invoice-client-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:18px 0}.invoice-client-summary article{display:grid;gap:6px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.invoice-client-summary span{color:var(--muted);font-size:12px;font-weight:700}.invoice-total-summary{border-color:var(--text)!important;background:var(--text)!important;color:var(--inverse)!important}.invoice-total-summary span{color:inherit!important}.invoice-total-summary strong{font-size:20px}@media(max-width:980px){.invoice-client-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.invoice-client-summary{grid-template-columns:1fr}}
/* Hospedarlo identity layer */
:root{--bg:#f7f9fc;--surface:#fff;--surface-2:#f7f9fc;--text:#081f5c;--muted:#66748b;--line:#e6edf5;--line-strong:#cbd5e1;--inverse:#fff;--accent:#ff7417;--success:#16803c;--danger:#c33232;--shadow:0 18px 60px rgba(8,31,92,.10)}
.button,.auth-submit{background:#ff7417!important;border-color:#ff7417!important;color:#fff!important}.button:hover,.auth-submit:hover{background:#ff5d15!important;border-color:#ff5d15!important}.portal-shell .sidebar{background:#081f5c;border-right-color:rgba(255,255,255,.12)}.portal-shell .sidebar .nav-link,.portal-shell .sidebar .portal-name,.portal-shell .sidebar .sidebar-label{color:#dce7fb}.portal-shell .sidebar .nav-link.active,.portal-shell .sidebar .nav-link:hover{color:#fff;background:rgba(255,116,23,.22)}.auth-page{background:linear-gradient(135deg,#081f5c 0%,#123b8f 55%,#ff7417 160%)}
/* Hospedarlo sidebar: bright, accessible navigation and logo treatment. */
.portal-shell .sidebar{background:#ffffff!important;border-right:1px solid #d7e4ef!important;box-shadow:8px 0 28px rgba(8,31,92,.05)}
.portal-shell .sidebar .brand{justify-content:center;min-height:64px;margin:0 0 16px;padding:9px 8px;border:1px solid #e6edf5;border-radius:12px;background:#f7f9fc}
.portal-shell .sidebar .brand .logo-pair{width:190px;height:52px}.portal-shell .sidebar .brand img{width:190px;height:52px;object-fit:contain}
.portal-shell .sidebar .portal-name,.portal-shell .sidebar .sidebar-label{color:#66748b!important}.portal-shell .sidebar .nav-link{color:#081f5c!important;border:1px solid transparent;font-weight:700}
.portal-shell .sidebar .nav-link svg{color:#ff7417}.portal-shell .sidebar .nav-link:hover{color:#081f5c!important;border-color:#ffd3b8;background:#fff3ea!important}.portal-shell .sidebar .nav-link.active{color:#ffffff!important;border-color:#ff7417;background:#ff7417!important;box-shadow:0 8px 18px rgba(255,116,23,.22)}.portal-shell .sidebar .nav-link.active svg{color:#fff}
.portal-shell .sidebar .logout-button{color:#081f5c;border-color:#d7e4ef;background:#fff}.portal-shell .sidebar .logout-button:hover{color:#c33232;border-color:#ffd3b8;background:#fff3ea}
/* Hospedarlo filter and state system: the selected view is always unambiguous. */
.button.secondary{color:#081f5c!important;border-color:#b9cbe0!important;background:#fff!important}.button.secondary:hover{color:#081f5c!important;border-color:#ff7417!important;background:#fff3ea!important;opacity:1}
.filters,.section-filters,.ticket-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.filters>a,.section-filters>a,.ticket-filters>a,.filters .button.secondary,.section-filters .button.secondary,.ticket-filters .button.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border:1px solid #c7d5e5!important;border-radius:9px!important;color:#38516f!important;background:#fff!important;font-size:12px;font-weight:800;line-height:1;text-decoration:none;box-shadow:none}.filters>a:hover,.section-filters>a:hover,.ticket-filters>a:hover,.filters .button.secondary:hover,.section-filters .button.secondary:hover,.ticket-filters .button.secondary:hover{border-color:#ff7417!important;color:#a84500!important;background:#fff3ea!important}.filters>a.active,.section-filters>a.active,.ticket-filters>a.active,.filters .active,.section-filters .active,.ticket-filters .active{border-color:#ff7417!important;color:#fff!important;background:#ff7417!important;box-shadow:0 6px 16px rgba(255,116,23,.24)!important}.filters>a.active:hover,.section-filters>a.active:hover,.ticket-filters>a.active:hover{color:#fff!important;background:#ff5d15!important}
.badge{gap:6px;min-height:27px;padding:4px 10px;border-width:1px;border-style:solid;font-size:12px;font-weight:800;letter-spacing:.01em}.badge .status-dot{width:7px;height:7px;margin:0;background:currentColor;box-shadow:0 0 0 2px currentColor opacity(.12)}
/* Positive: live, paid, delivered or resolved. */
.badge-active,.badge-paid,.badge-provisioned,.badge-resolved,.badge-completed,.badge-success,.badge-enabled,.badge-open{color:#14783a!important;background:#edf8f0!important;border-color:#9fd7ae!important}
/* Attention: action is required or a workflow is underway. */
.badge-pending,.badge-queued,.badge-processing,.badge-in_progress,.badge-waiting_client,.badge-past_due,.badge-overdue,.badge-paused,.badge-suspended,.badge-cancellation_scheduled,.badge-cancellation-scheduled{color:#935c00!important;background:#fff8e5!important;border-color:#edc874!important}
/* Informational: newly received or client activity. */
.badge-new,.badge-client_replied,.badge-info,.badge-draft{color:#155eaa!important;background:#edf5ff!important;border-color:#99bfe8!important}
/* Negative/final: unavailable, cancelled, revoked, failed or deleted. */
.badge-inactive,.badge-cancelled,.badge-failed,.badge-delete_failed,.badge-deleted,.badge-revoked,.badge-expired,.badge-error,.badge-high{color:#b3261e!important;background:#fff1f0!important;border-color:#efaaa5!important}
.badge-suspended,.badge-paused,.badge-cancelled,.badge-failed,.badge-delete_failed,.badge-deleted,.badge-revoked{border-style:solid}
[data-theme="dark"] .filters>a,[data-theme="dark"] .section-filters>a,[data-theme="dark"] .ticket-filters>a{color:#d6e3f4!important;border-color:#405573!important;background:#162238!important}[data-theme="dark"] .filters>a.active,[data-theme="dark"] .section-filters>a.active,[data-theme="dark"] .ticket-filters>a.active{color:#fff!important;border-color:#ff7417!important;background:#ff7417!important}
/* Keep the Hospedarlo logo clean in the sidebar: no card, no rounded border. */
.portal-shell .sidebar .brand{margin:0 0 16px;padding:4px 0 12px;border:0!important;border-radius:0!important;background:transparent!important}
.portal-shell .sidebar .brand .logo-pair{width:190px;height:52px}.portal-shell .sidebar .brand img{width:190px;height:52px;object-fit:contain}
