body {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background: #f5f7fb;
}

.dashboard-main {
    min-height: 100vh;
}

.dashboard-main-body {
    padding: 24px;
}

.impersonation-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 24px;
    background: #d6ebff;
    border-bottom: 1px solid #7ab6f2;
    color: #003d7a;
    font-weight: 600;
}

.stats-grid,
.panel-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

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

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

.panel-grid-wide {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.stat-card,
.panel,
.thread-card,
.order-card,
.article-card,
.billing-demo-box,
.billing-template-copy {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.stat-card {
    padding: 24px;
}

.stat-card span {
    display: block;
    color: #667085;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 28px;
    color: #101828;
}

.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.08);
}

.panel,
.thread-card,
.order-card,
.article-card {
    padding: 24px;
    overflow: hidden;
}

.panel h2,
.panel h3 {
    margin-bottom: 18px;
}

.panel h2 {
    font-size: 20px;
    font-weight: 500;
    color: #243a57;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

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

.stack-form label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 600;
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.inline-form input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: #101828;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.inline-form input:focus {
    outline: 0;
    border-color: #98a2b3;
    box-shadow: 0 0 0 3px rgba(152, 162, 179, 0.15);
}

.stack-form button,
.inline-form button {
    border: 0;
    background: #111827;
    color: #fff;
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 700;
}

.stack-form button:hover,
.inline-form button:hover {
    background: #1f2937;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.panel table {
    min-width: 640px;
}

.panel {
    overflow-x: auto;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #eaecf0;
    vertical-align: top;
}

th {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.thread-card {
    margin-bottom: 20px;
}

.thread-card header,
.order-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.message {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #eaecf0;
}

.message.staff {
    background: #ecfdf3;
}

.message.client {
    background: #ebf5ff;
}

.message-client-log {
    background: #f8fafc;
    color: #344054;
    line-height: 1.65;
}

.article-list {
    display: grid;
    gap: 16px;
}

.article-list-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-state {
    padding: 32px 20px;
    text-align: center;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: #fbfcfd;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: #667085;
    margin-bottom: 16px;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.service-toolbar,
.invoice-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.section-intro {
    color: #667085;
    margin-bottom: 18px;
}

.service-stack,
.domain-stack {
    display: grid;
    gap: 16px;
}

.service-shell {
    display: grid;
    gap: 16px;
}

.service-shell-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.service-shell-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-shell-meta span,
.plan-badge,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.status-chip.status-active {
    background: #ecfdf3;
    color: #067647;
}

.status-chip.status-suspended,
.status-chip.status-overdue,
.status-chip.status-grace {
    background: #edf6ff;
    color: #0a67c4;
}

.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.service-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: #111827;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.service-link-button.secondary {
    background: #eef2f6;
    color: #344054 !important;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.plan-card {
    position: relative;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    padding: 22px;
}

.plan-card.is-featured {
    border-color: #98a2b3;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.1);
}

.plan-card h3 {
    margin-bottom: 4px;
}

.plan-card p {
    color: #667085;
}

.plan-price {
    margin: 18px 0 12px;
    color: #101828;
}

.plan-price strong {
    display: block;
    font-size: 30px;
    line-height: 1.1;
}

.plan-price span {
    color: #667085;
    font-size: 14px;
}

.plan-card ul {
    margin: 16px 0 0;
    padding-left: 18px;
    color: #344054;
}

.plan-card li + li {
    margin-top: 8px;
}

.plan-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}

.plan-domain-toggle {
    border: 0;
    background: transparent;
    color: #0f4c81;
    font-weight: 700;
    padding: 0;
    margin-left: 6px;
}

.plan-card details {
    margin-top: 14px;
    border-top: 1px solid #eaecf0;
    padding-top: 14px;
}

.plan-card details summary {
    cursor: pointer;
    font-weight: 700;
    color: #344054;
}

.plan-card details[open] summary {
    margin-bottom: 12px;
}

.plan-form {
    margin-top: 16px;
}

.plan-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.plan-filter-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-weight: 700;
}

.service-accordion,
.domain-accordion {
    border-top: 1px solid #eaecf0;
    padding-top: 12px;
}

.service-accordion summary,
.domain-accordion summary {
    cursor: pointer;
    font-weight: 700;
    color: #344054;
}

.service-accordion[open] summary,
.domain-accordion[open] summary {
    margin-bottom: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-item {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
}

.detail-item strong {
    display: block;
    margin-bottom: 6px;
    color: #101828;
}

.action-dropdown {
    position: relative;
}

.action-dropdown summary {
    list-style: none;
    cursor: pointer;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 700;
    color: #344054;
}

.action-dropdown summary::-webkit-details-marker {
    display: none;
}

.action-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    z-index: 10;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
    padding: 8px;
    display: grid;
    gap: 6px;
}

.action-dropdown-menu-wide {
    min-width: 320px;
}

.compact-form {
    gap: 10px;
}

.action-dropdown-menu a,
.action-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    color: #101828;
    border: 0;
    text-decoration: none;
    font-weight: 600;
}

.action-dropdown-menu a:hover,
.action-dropdown-menu button:hover {
    background: #f2f4f7;
    text-decoration: none;
}

.invoice-sheet {
    max-width: 980px;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.invoice-summary {
    margin-top: 18px;
    margin-left: auto;
    max-width: 280px;
}

.invoice-summary p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.template-card summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    cursor: pointer;
    list-style: none;
}

.template-card summary::-webkit-details-marker {
    display: none;
}

.eyebrow {
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-content {
    margin-top: 12px;
    color: #475467;
    line-height: 1.6;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.billing-template-logo {
    max-width: 240px;
    width: 100%;
    height: auto;
}

.billing-template-copy {
    max-width: 520px;
    padding: 32px;
}

.billing-template-copy p {
    color: #667085;
}

.billing-demo-box {
    padding: 16px 18px;
    color: #344054;
    line-height: 1.7;
}

.alert {
    border-radius: 14px;
}

.table-responsive {
    overflow-x: auto;
}

.panel > table,
.panel .table-responsive > table {
    min-width: 760px;
}

.panel a {
    color: #0f4c81;
    font-weight: 600;
    text-decoration: none;
}

.panel a:hover {
    text-decoration: underline;
}

.mail-template-page {
    padding: 18px;
}

.mail-template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.mail-template-header h2 {
    margin-bottom: 8px;
}

.mail-template-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.mail-template-action {
    position: relative;
}

.mail-template-action summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid #cfd7e3;
    border-radius: 6px;
    padding: 9px 14px;
    background: #fff;
    color: #344054;
    font-weight: 600;
    white-space: nowrap;
}

.mail-template-action summary::-webkit-details-marker {
    display: none;
}

.mail-template-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd7e3;
    border-radius: 6px;
    padding: 9px 14px;
    background: #fff;
    color: #344054 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.mail-template-link-button.secondary {
    background: #f8fafc;
}

.mail-template-action[open] summary {
    background: #f8fafc;
}

.mail-template-action-body {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(440px, 92vw);
    padding: 16px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
}

.template-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.template-column {
    display: grid;
    gap: 20px;
}

.template-group h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #4b5565;
}

.template-group-header {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 64px;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 4px;
    background: #1f5a91;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

.template-rows {
    border: 1px solid #dce3ed;
    border-radius: 4px;
    background: #fff;
}

.template-row {
    border-bottom: 1px solid #e8edf3;
}

.template-row:last-child {
    border-bottom: 0;
}

.template-row summary,
.template-row.static-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 64px;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
}

.template-row summary {
    cursor: pointer;
    list-style: none;
}

.template-row summary::-webkit-details-marker {
    display: none;
}

.template-row summary:hover {
    background: #f8fbff;
}

.template-row.static-row:hover {
    background: #f8fbff;
}

.template-status {
    display: inline-flex;
    align-items: center;
}

.template-status-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.template-status-dot.is-active {
    background: #6fcb57;
}

.template-status-dot.is-inactive {
    background: #cbd5e1;
}

.template-name {
    color: #30476d;
    font-size: 13px;
    line-height: 1.4;
}

.template-edit-link {
    color: #295b91;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.template-edit-panel {
    padding: 12px;
    border-top: 1px solid #e8edf3;
    background: #fbfdff;
}

.template-open-link {
    color: #295b91;
    font-size: 13px;
    font-weight: 700;
}

.history-table-compact th,
.history-table-compact td {
    white-space: nowrap;
}

.template-editor-page {
    padding: 8px 6px 18px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.template-editor-page h2 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 400;
}

.template-editor-name {
    margin-bottom: 18px;
    font-size: 14px;
    color: #444;
}

.template-settings-box {
    border: 1px solid #d8dde5;
    border-radius: 3px;
    background: #fafafa;
    overflow: hidden;
    margin-bottom: 22px;
}

.template-settings-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    min-height: 36px;
    border-bottom: 1px solid #e5e9ef;
}

.template-settings-row:last-child {
    border-bottom: 0;
}

.template-settings-label,
.template-settings-field {
    padding: 4px 10px;
    font-size: 13px;
}

.template-settings-label {
    text-align: right;
    color: #4d4d4d;
}

.template-settings-field-inline {
    display: grid;
    grid-template-columns: 200px minmax(280px, 400px);
    gap: 6px;
}

.template-settings-field-help {
    display: grid;
    grid-template-columns: 400px auto;
    gap: 6px;
    align-items: center;
}

.template-settings-field-help span,
.template-settings-field-attachment span,
.template-inline-check {
    color: #555;
    font-size: 13px;
}

.template-settings-field-attachment {
    display: grid;
    gap: 6px;
}

.template-attachment-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.template-inline-check input {
    width: auto;
}

.template-version-copy {
    margin: 0 0 18px;
    color: #444;
    font-size: 13px;
}

.template-subject-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 700px);
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.template-subject-row label {
    margin: 0;
    color: #444;
}

.template-editor-html-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.template-editor-html-toggle button {
    border: 1px solid #c9d2df;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
    padding: 9px 14px;
    color: #294a74;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(48, 71, 109, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.template-editor-html-toggle button:hover {
    border-color: #aebed3;
    background: linear-gradient(180deg, #ffffff 0%, #e6eef8 100%);
    box-shadow: 0 10px 22px rgba(48, 71, 109, 0.14);
    transform: translateY(-1px);
}

.template-editor-shell {
    border: 1px solid #cad4e2;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(36, 58, 92, 0.08);
}

.template-editor-shell.is-text-only {
    opacity: 0.55;
}

.template-editor-shell.is-hidden {
    display: none;
}

.template-editor-page .mce-tinymce {
    border: 0 !important;
    box-shadow: none !important;
}

.template-editor-page .mce-panel,
.template-editor-page .mce-container,
.template-editor-page .mce-container-body {
    background: #fff;
}

.template-editor-page .mce-menubar,
.template-editor-page .mce-toolbar-grp,
.template-editor-page .mce-statusbar {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
    border-color: #d7e0ea !important;
}

.template-editor-page .mce-menubtn button,
.template-editor-page .mce-listbox button,
.template-editor-page .mce-btn button {
    color: #365172 !important;
    border-radius: 6px !important;
}

.template-editor-page .mce-menubtn button span,
.template-editor-page .mce-listbox button span,
.template-editor-page .mce-btn button span,
.template-editor-page .mce-ico,
.template-editor-page .mce-caret,
.template-editor-page .mce-caret:before,
.template-editor-page .mce-label,
.template-editor-page .mce-menubar .mce-menubtn span,
.template-editor-page .mce-statusbar,
.template-editor-page .mce-statusbar .mce-path,
.template-editor-page .mce-statusbar .mce-wordcount,
.template-editor-page .mce-statusbar .mce-branding,
.template-editor-page .mce-statusbar .mce-branding a {
    color: #666 !important;
}

.template-editor-page .mce-menubar .mce-menubtn button:hover,
.template-editor-page .mce-toolbar-grp .mce-btn button:hover,
.template-editor-page .mce-toolbar-grp .mce-listbox button:hover,
.template-editor-page .mce-toolbar-grp .mce-btn.mce-active button,
.template-editor-page .mce-toolbar-grp .mce-listbox.mce-active button {
    background: #edf4fb !important;
}

.template-editor-page .mce-edit-area {
    border-top: 1px solid #d7e0ea !important;
}

.template-editor-page .mce-edit-area iframe {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.template-text-fallback {
    display: none;
    min-height: 260px;
    margin-top: 14px;
    border: 1px solid #cad4e2;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 38px rgba(36, 58, 92, 0.05);
    padding: 16px 18px;
    color: #21344d;
    line-height: 1.6;
    resize: vertical;
}

.template-text-fallback.is-visible {
    display: block;
}

.template-html-editor,
.template-textarea {
    width: 100%;
}

.template-merge-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px;
    margin-top: 22px;
}

.template-merge-card h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #444;
}

.merge-field-group + .merge-field-group {
    margin-top: 14px;
}

.merge-field-group h4 {
    margin-bottom: 8px;
    font-size: 14px;
    color: #222;
    font-weight: 700;
}

.merge-fields-table td {
    padding: 2px 6px;
    font-size: 13px;
    border-bottom: 0;
}

.merge-fields-table code {
    color: #222;
    font-weight: 400;
    background: transparent;
    padding: 0;
}

.template-doc-block {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.template-editor-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.template-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #c9d0d9;
    border-radius: 4px;
    background: #f6f7f9;
    color: #555 !important;
    text-decoration: none !important;
    font-weight: 400 !important;
}

.admin-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-orders-count {
    min-width: 132px;
    padding: 14px 16px;
    border: 1px solid #d9e1eb;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
    text-align: center;
}

.admin-orders-count strong {
    display: block;
    color: #21344d;
    font-size: 26px;
    line-height: 1;
}

.admin-orders-count span {
    color: #62748a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-orders-filter {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 220px auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.admin-orders-clear {
    color: #486689 !important;
    font-weight: 700;
}

.admin-orders-bulk-form {
    display: grid;
    gap: 14px;
}

.admin-orders-bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.admin-orders-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334a68;
    font-weight: 600;
}

.admin-orders-select-all input,
.admin-orders-checkbox-cell input {
    width: 16px;
    height: 16px;
    accent-color: #2f6cb3;
    border: 1px solid #8ea4be;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(142, 164, 190, 0.22);
}

.admin-orders-bulk-actions,
.admin-orders-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-orders-bulk-actions button,
.admin-orders-row-actions button,
.admin-orders-filter button {
    border: 1px solid #c9d2df;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
    color: #294a74;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 14px;
    box-shadow: 0 8px 18px rgba(48, 71, 109, 0.08);
}

.admin-orders-bulk-actions select {
    min-width: 190px;
    height: 40px;
    min-height: 40px;
    padding: 0 36px 0 12px !important;
    line-height: 40px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2330445b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
}

.admin-orders-filter select {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 36px 0 12px !important;
    line-height: 40px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2330445b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
}

.admin-orders-bulk-label {
    color: #556b84;
    font-size: 13px;
    font-weight: 700;
}

.admin-orders-bulk-actions button.is-danger,
.admin-orders-row-actions button.is-danger {
    border-color: #efc3c3;
    background: linear-gradient(180deg, #fffafa 0%, #fbeaea 100%);
    color: #a33f3f;
}

.admin-orders-bulk-actions button.is-secondary,
.admin-orders-row-actions button.is-secondary {
    border-color: #ced8e6 !important;
    background: linear-gradient(180deg, #fbfdff 0%, #eef3f9 100%) !important;
    color: #486689 !important;
}

.admin-orders-table th,
.admin-orders-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.admin-orders-table td strong,
.admin-orders-table td small {
    display: block;
}

.admin-orders-table td small {
    color: #6f8197;
    white-space: normal;
}

.admin-orders-checkbox-cell {
    width: 42px;
}

.admin-orders-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.admin-orders-pill.is-payment {
    background: #d7e7f7;
    color: #1c548b;
}

.admin-orders-pill.is-status.is-pending {
    background: #d5e6f8;
    color: #245d96;
}

.admin-orders-pill.is-status.is-provisioned {
    background: #deefe2;
    color: #266344;
}

.admin-orders-pill.is-status.is-cancelled {
    background: #f8e1e1;
    color: #a03e3e;
}

.admin-orders-empty {
    padding: 28px 16px !important;
    text-align: center;
    color: #607286;
}

.client-summary-page {
    display: grid;
    gap: 16px;
    --client-summary-accent: #1f5f9f;
    --client-summary-accent-strong: #124b82;
    --client-summary-border: #d9e3ee;
    --client-summary-border-strong: #b8cbe0;
    --client-summary-surface: #ffffff;
    --client-summary-surface-muted: #f6f9fc;
    --client-summary-surface-soft: #edf3f9;
    --client-summary-text: #243a57;
    --client-summary-text-muted: #61758b;
    --client-summary-shadow: 0 10px 24px rgba(28, 49, 77, 0.06);
}

.client-summary-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--client-summary-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    box-shadow: var(--client-summary-shadow);
}

.client-summary-header h2 {
    margin: 0;
    color: #1f3552;
    font-size: 16px;
}

.client-summary-header h1 {
    margin: 0;
    color: #1f3552;
    font-size: 18px;
}

.client-summary-name {
    margin: 6px 0 0;
    color: #385473;
    font-size: 13px;
    font-weight: 700;
}

.client-picker-form {
    margin-top: 10px;
}

.client-picker-select {
    min-width: min(520px, 100%);
    max-width: 100%;
    border: 1px solid #bfd0e3;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: #284463;
}

.client-summary-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.client-summary-tabs a,
.client-summary-link-button,
.client-summary-static-button,
.client-profile-admin-actions button,
.client-profile-admin-actions a,
.client-action-card button,
.client-action-card a,
.client-more-dropdown summary,
.client-summary-action-row button,
.client-summary-action-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--client-summary-border-strong);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, var(--client-summary-surface-soft) 100%);
    color: var(--client-summary-accent) !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    list-style: none;
}

.client-summary-tabs a:hover,
.client-summary-link-button:hover,
.client-summary-static-button:hover,
.client-profile-admin-actions button:hover,
.client-profile-admin-actions a:hover,
.client-action-card button:hover,
.client-action-card a:hover,
.client-more-dropdown summary:hover,
.client-summary-action-row button:hover,
.client-summary-action-row a:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e4edf7 100%);
    border-color: #93b0cf;
    color: var(--client-summary-accent-strong) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(31, 95, 159, 0.08);
}

.client-summary-tabs a.is-active {
    background: linear-gradient(180deg, #eff5fb 0%, #dbe8f6 100%);
    border-color: #6e97c6;
    color: #0f4679 !important;
    box-shadow: 0 8px 16px rgba(31, 95, 159, 0.10);
}

.client-summary-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-summary-header-actions button {
    border: 1px solid #c9d2df;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
    color: #294a74;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 12px;
}

.client-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.client-summary-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-summary-card {
    border: 1px solid var(--client-summary-border);
    border-radius: 14px;
    background: var(--client-summary-surface);
    padding: 14px;
    box-shadow: var(--client-summary-shadow);
}

.client-summary-card h3 {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--client-summary-text);
}

.client-summary-card h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--client-summary-text);
}

.client-summary-subtitle {
    margin: 14px 0 8px;
    color: #35506f;
    font-size: 12px;
    font-weight: 700;
}

.client-summary-table,
.client-summary-list-table {
    font-size: 12px;
}

.client-summary-table tbody tr,
.client-summary-list-table tbody tr {
    border-top: 1px solid #ebf1f6;
}

.client-summary-table tbody tr:first-child,
.client-summary-list-table tbody tr:first-child {
    border-top: 0;
}

.client-summary-table th {
    width: 180px;
    color: #566c85;
    font-weight: 700;
    font-size: 12px;
    padding: 10px 10px 10px 0;
    vertical-align: top;
}

.client-summary-inline-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--client-summary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.client-summary-table td {
    color: var(--client-summary-text);
    font-size: 12px;
    padding: 10px 0;
    vertical-align: top;
}

.client-summary-list-table th,
.client-summary-list-table td {
    padding-top: 11px;
    padding-bottom: 11px;
}

.client-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.client-summary-metrics div {
    border: 1px solid #e1e8f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    padding: 10px 12px;
}

.client-summary-metrics span {
    display: block;
    color: #6a7d93;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.client-summary-metrics strong {
    display: block;
    margin-top: 4px;
    color: #243a57;
    font-size: 12px;
}

.client-summary-message-form {
    max-width: 760px;
}

.client-summary-list-table th,
.client-summary-list-table td {
    white-space: nowrap;
}

.client-summary-message-list {
    margin: 0;
    padding-left: 18px;
    color: #334a68;
}

.client-summary-message-list a,
.client-summary-card a {
    color: var(--client-summary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.client-summary-message-list a:hover,
.client-summary-card a:hover {
    color: #124b82;
}

.client-summary-anchor-strip {
    display: block;
    height: 0;
}

.client-profile-admin-form {
    gap: 14px;
}

.client-profile-fields {
    display: grid;
    gap: 12px;
}

.client-profile-check-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: var(--client-summary-surface-muted);
}

.client-profile-check-group span {
    color: #35506f;
    font-size: 12px;
    font-weight: 700;
}

.client-profile-check-group label {
    margin: 0;
    color: #48627f;
    font-size: 12px;
}

.client-profile-check-group input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

.client-profile-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.client-profile-form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.client-profile-form-table th {
    width: 15%;
    color: #566c85;
    font-size: 12px;
    font-weight: 700;
    vertical-align: top;
    padding: 8px 12px 8px 0;
}

.client-profile-form-table td {
    width: 35%;
    padding: 0 12px 0 0;
    vertical-align: top;
}

.client-profile-form-table input,
.client-profile-form-table select,
.client-profile-form-table textarea {
    width: 100%;
    border: 1px solid #cbd8e5;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.client-profile-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.client-summary-empty-copy {
    margin: 0 0 14px;
    color: var(--client-summary-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.client-summary-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.client-summary-action-row form {
    margin: 0;
}

.client-summary-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.client-action-card {
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: var(--client-summary-surface-muted);
    padding: 12px 14px;
}

.client-action-card summary {
    cursor: pointer;
    color: #26415f;
    font-weight: 700;
    font-size: 12px;
    list-style: none;
}

.client-action-card summary::-webkit-details-marker {
    display: none;
}

.client-action-card[open] summary {
    margin-bottom: 8px;
}

.client-action-inline {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-action-card button,
.client-action-card a {
    width: 100%;
}

.client-summary-static-button {
    display: inline-flex;
}

.client-contact-domain-card {
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: #fcfdff;
    padding: 14px;
}

.client-contact-domain-card + .client-contact-domain-card {
    margin-top: 10px;
}

.client-contact-domain-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.client-contact-domain-head strong,
.client-contact-domain-head span {
    display: block;
}

.client-contact-domain-head span {
    color: #647990;
    font-size: 11px;
}

.client-notes-form textarea {
    min-height: 260px;
    resize: vertical;
}

.client-service-row-active {
    background: #f3f8fd;
}

.admin-ticket-list {
    display: grid;
    gap: 10px;
}

.admin-ticket-list-item {
    display: grid;
    gap: 8px;
    padding: 12px 13px;
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 16px rgba(28, 49, 77, 0.04);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-ticket-list-item:hover {
    transform: translateY(-1px);
    border-color: #b9cee5;
    box-shadow: 0 10px 22px rgba(28, 49, 77, 0.08);
}

.admin-ticket-list-item.is-active {
    border-color: #6f9dcc;
    background: linear-gradient(180deg, #f3f8fe 0%, #eaf2fb 100%);
    box-shadow: 0 10px 24px rgba(31, 95, 159, 0.10);
}

.admin-ticket-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-ticket-list-top strong {
    color: #1e3858;
    font-size: 12px;
}

.admin-ticket-list-item h4 {
    margin: 0;
    color: #1c3049;
    font-size: 13px;
    line-height: 1.35;
}

.admin-ticket-list-meta,
.admin-ticket-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-ticket-list-meta span,
.admin-ticket-context span,
.admin-ticket-list-item small {
    font-size: 11px;
    color: #62768d;
}

.admin-ticket-context span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4fa;
    color: #3f5b79;
}

.admin-ticket-status,
.admin-ticket-priority {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-ticket-status-open {
    background: #dff2e6;
    color: #246544;
}

.admin-ticket-status-answered {
    background: #e4edf9;
    color: #2d5e9d;
}

.admin-ticket-status-customer-reply {
    background: #d8ecff;
    color: #1a5a9b;
}

.admin-ticket-status-closed {
    background: #f1f3f6;
    color: #66788d;
}

.admin-ticket-priority-low {
    background: #eef3f8;
    color: #5d758d;
}

.admin-ticket-priority-medium {
    background: #e7f0fb;
    color: #2f629f;
}

.admin-ticket-priority-high {
    background: #fde9e9;
    color: #a13f3f;
}

.admin-ticket-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.admin-ticket-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #d2dcea;
    border-radius: 9px;
    background: #fff;
    color: #365474;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-ticket-pagination a.is-active {
    background: #1f5f9f;
    border-color: #1f5f9f;
    color: #fff;
}

.ticket-attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ticket-attachment-list a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef4fa;
    color: #315577;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.client-service-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf1f6;
}

.client-service-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.client-more-dropdown {
    position: relative;
}

.client-more-dropdown summary {
    white-space: nowrap;
}

.client-more-dropdown summary::-webkit-details-marker {
    display: none;
}

.client-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    min-width: 270px;
    padding: 8px;
    border: 1px solid #ccd8e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 28px rgba(26, 45, 74, 0.12);
}

.client-more-menu a,
.client-more-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--client-summary-accent);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    border-radius: 8px;
}

.client-more-menu a:hover,
.client-more-menu button:hover {
    background: #f2f7fc;
}

.client-more-menu button.is-danger {
    color: #a33f3f;
}

.client-inline-link-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-inline-link-field a {
    white-space: nowrap;
}

.client-checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #35506f;
}

.client-checkbox-line input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.client-service-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.client-service-transfer-form,
.client-service-admin-form {
    gap: 14px;
}

.client-domain-period-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-domain-period-row span {
    color: #566c85;
    font-size: 12px;
    white-space: nowrap;
}

.client-domain-tools {
    gap: 8px;
}

.client-domain-tools label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-domain-notes-form {
    margin-top: 10px;
}

.client-ticket-thread {
    display: grid;
    gap: 12px;
}

.client-ticket-message {
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfdff;
}

.client-ticket-message.is-staff {
    background: #eef5fc;
}

.client-ticket-message header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.client-ticket-message header span {
    color: #647990;
    font-size: 11px;
}

.client-ticket-message p {
    margin: 0;
    color: #29415f;
    font-size: 12px;
}

.client-email-body {
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: #fbfdff;
    padding: 14px;
    color: #29415f;
    font-size: 12px;
    line-height: 1.6;
    white-space: normal;
}

.client-action-card button.is-danger {
    border-color: #efc3c3;
    background: linear-gradient(180deg, #fffafa 0%, #fbeaea 100%);
    color: #a33f3f !important;
}

.client-action-card button.is-warning {
    border-color: #a5caee;
    background: linear-gradient(180deg, #fffdf7 0%, #d9eafb 100%);
    color: #20568c !important;
}

.client-action-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.client-action-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
    color: var(--client-summary-accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.client-action-links a:hover {
    background: linear-gradient(180deg, #ffffff 0%, #eaf2fb 100%);
    border-color: #93b0cf;
    color: var(--client-summary-accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(31, 95, 159, 0.08);
}

.client-summary-top-card {
    padding-bottom: 12px;
}

.client-summary-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #385473;
    font-size: 12px;
    font-weight: 700;
}

.client-summary-identity {
    margin-top: 10px;
    color: #1f3552;
    font-size: 18px;
    font-weight: 800;
}

.client-summary-link-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--client-summary-accent);
}

.client-summary-link-list li + li {
    margin-top: 8px;
}

.client-summary-link-list a {
    color: var(--client-summary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.client-summary-page .stack-form button,
.client-summary-page .inline-form button {
    border: 1px solid #1d568f;
    background: linear-gradient(180deg, #2f6ea8 0%, #1f5f9f 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 18px rgba(31, 95, 159, 0.14);
}

.client-summary-page .stack-form button:hover,
.client-summary-page .inline-form button:hover {
    background: linear-gradient(180deg, #3679b6 0%, #225f97 100%);
}

.client-summary-page .client-summary-action-row button,
.client-summary-page .client-profile-admin-actions button,
.client-summary-page .client-action-card button,
.client-summary-page .client-more-menu button {
    box-shadow: none;
}

.client-summary-page .client-more-menu button,
.client-summary-page .client-more-menu button:hover {
    border: 0;
    transform: none;
}

.client-summary-page .client-more-menu button.is-danger,
.client-summary-page .client-more-menu button.is-danger:hover {
    background: transparent;
}

.invoice-admin-page {
    gap: 14px;
}

.invoice-admin-card h2 {
    margin: 0;
    color: #243a57;
    font-size: 16px;
}

.invoice-admin-client-head,
.invoice-detail-head,
.invoice-admin-actions,
.invoice-admin-table-head,
.invoice-bulk-actions,
.invoice-detail-tools,
.invoice-panel-actions,
.invoice-inline-actions,
.invoice-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.invoice-admin-client-switch,
.invoice-admin-client-switch label {
    display: grid;
    gap: 6px;
}

.invoice-admin-filter-form {
    display: grid;
    gap: 16px;
}

.invoice-admin-actions form {
    margin: 0;
}

.invoice-admin-filter-grid,
.invoice-detail-summary-grid,
.invoice-ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.invoice-edit-grid {
    margin-top: 16px;
}

.invoice-admin-filter-grid label,
.invoice-panel-section label {
    display: grid;
    gap: 6px;
    color: #35506f;
    font-size: 12px;
    font-weight: 700;
}

.invoice-admin-filter-grid input,
.invoice-admin-filter-grid select,
.invoice-panel-section textarea,
.invoice-panel-section input,
.invoice-panel-section select,
.invoice-items-table textarea,
.invoice-items-table input,
.invoice-admin-client-switch select {
    width: 100%;
    border: 1px solid #cbd8e5;
    border-radius: 10px;
    padding: 10px 12px;
    color: #243a57;
    background: #fff;
}

.invoice-detail-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.invoice-detail-tabs a,
.invoice-detail-tabs button,
.invoice-bulk-actions button.is-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--client-summary-border-strong);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, var(--client-summary-surface-soft) 100%);
    color: var(--client-summary-accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.invoice-detail-tabs button.is-active {
    background: linear-gradient(180deg, #eff5fb 0%, #dbe8f6 100%);
    border-color: #6e97c6;
    color: #0f4679;
    box-shadow: 0 8px 16px rgba(31, 95, 159, 0.10);
}

.invoice-summary-box {
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: #fbfdff;
    padding: 10px;
}

.invoice-summary-box .client-summary-table th {
    width: 35%;
}

.invoice-summary-status-box {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 8px;
    align-content: center;
}

.invoice-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.invoice-status-chip.is-draft {
    background: #eef2f7;
    color: #5b6d83;
}

.invoice-status-chip.is-paid {
    background: #e3f6e8;
    color: #247346;
}

.invoice-status-chip.is-unpaid {
    background: #fdecec;
    color: #b73a3a;
}

.invoice-status-chip.is-cancelled,
.invoice-status-chip.is-refunded {
    background: #f3f1ec;
    color: #4a6784;
}

.invoice-status-chip.is-warning {
    background: #d8ecff;
    color: #20568c;
}

.invoice-panel-section {
    display: grid;
    gap: 12px;
}

.invoice-tab-panel {
    display: none;
}

.invoice-tab-panel.is-active {
    display: block;
}

.invoice-unsaved-alert {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #91c0ef;
    border-radius: 10px;
    background: #d8ecff;
    color: #12477c;
    font-size: 12px;
    font-weight: 700;
}

.invoice-info-box {
    padding: 12px 14px;
    border: 1px solid #cfe0f2;
    border-radius: 12px;
    background: #f7fbff;
    color: #35506f;
    line-height: 1.5;
}

.invoice-credit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.invoice-credit-box {
    text-align: center;
    padding: 12px;
    border: 1px solid var(--client-summary-border);
    border-radius: 12px;
    background: #fbfdff;
}

.invoice-credit-inline {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}

.invoice-credit-inline input {
    max-width: 120px;
}

.invoice-items-table textarea {
    min-height: 44px;
    resize: vertical;
}

.invoice-items-table .invoice-add-row td {
    text-align: right;
}

.invoice-items-table th.text-right {
    text-align: right;
}

.invoice-batch-cell {
    background: #efefef;
}

.invoice-batch-cell select {
    min-width: 220px;
    border: 1px solid #cbd8e5;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.invoice-bulk-actions {
    margin-top: 12px;
    justify-content: flex-start;
}

.invoice-bulk-actions span {
    color: #35506f;
    font-size: 12px;
    font-weight: 700;
}

.invoice-row-actions {
    justify-content: flex-start;
}

.invoice-row-actions .client-summary-link-button,
.invoice-row-actions button,
.invoice-bulk-actions button,
.invoice-panel-actions button,
.invoice-inline-actions button,
.invoice-items-table button,
.invoice-admin-actions button {
    border: 1px solid #1d568f;
    background: linear-gradient(180deg, #2f6ea8 0%, #1f5f9f 100%);
    color: #fff;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 700;
}

.invoice-panel-actions button.is-warning {
    border-color: #337ec9;
    background: linear-gradient(180deg, #57a4f2 0%, #247ed7 100%);
    color: #fff;
}

.invoice-bulk-actions button.is-danger,
.invoice-row-actions button[value="delete"],
.invoice-items-table .invoice-remove-row {
    border-color: #c85a5a;
    background: linear-gradient(180deg, #d56b6b 0%, #b94a4a 100%);
}

.invoice-inline-actions button[disabled],
.invoice-credit-inline button[disabled],
.invoice-credit-inline input[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.invoice-inline-actions button[disabled] {
    border-color: #c9d2df;
    background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
    color: #6a7d93;
}

.invoice-ledger-card {
    padding: 0;
}

.invoice-ledger-card h3 {
    padding: 14px 14px 0;
}

.invoice-ledger-card .table-responsive {
    padding: 0 14px 14px;
}

.invoice-detail-tools-top {
    align-items: flex-start;
    justify-content: flex-start;
}

.invoice-detail-head {
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf1f6;
}

.invoice-action-dropdown {
    position: relative;
}

.invoice-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 240px;
    padding: 8px;
    border: 1px solid #ccd8e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 28px rgba(26, 45, 74, 0.12);
}

.invoice-dropdown-menu a {
    display: block;
    padding: 8px 10px;
    color: var(--client-summary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.invoice-dropdown-menu a + a {
    margin-top: 4px;
}

.invoice-tab-panel {
    padding-top: 4px;
}

.setup-page {
    position: relative;
}

.setup-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--client-summary-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    box-shadow: var(--client-summary-shadow);
}

.setup-hero h1 {
    margin: 0;
    color: #1f3552;
    font-size: 20px;
}

.setup-hero .lead {
    margin: 6px 0 0;
    color: #61758b;
    font-size: 13px;
}

.setup-progress-banner {
    min-width: min(360px, 100%);
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d6e2ee;
    border-radius: 14px;
    background: #fdfefe;
}

.setup-progress-banner a {
    color: #1f5f9f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.setup-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setup-progress {
    flex: 1 1 auto;
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #e8eff7;
}

.setup-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2fb46e 0%, #23945a 100%);
}

.system-settings-index {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}

.setup-left-col,
.setup-right-col {
    min-width: 0;
}

.setup-left-col {
    display: grid;
    gap: 14px;
    align-content: start;
}

.setup-filter-container,
.setup-recently-visited,
.setup-setting,
.setup-edit-panels .client-summary-card {
    border: 1px solid var(--client-summary-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--client-summary-shadow);
}

.setup-filter-container {
    position: relative;
    padding: 10px 12px 10px 38px;
}

.setup-filter-container i,
.setup-filter-container button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #6d8198;
}

.setup-filter-container i {
    left: 12px;
}

.setup-filter-container button {
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
}

.setup-filter-container input {
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: 28px;
}

.setup-side-menu {
    margin: 0;
    padding: 10px;
    list-style: none;
    border: 1px solid var(--client-summary-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--client-summary-shadow);
}

.setup-side-menu li + li {
    margin-top: 4px;
}

.setup-side-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #35506f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.setup-side-menu li.active a,
.setup-side-menu a:hover {
    background: #edf4fb;
    color: #174a7d;
}

.setup-recently-visited {
    padding: 14px;
}

.setup-recently-visited h3 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #243a57;
}

.setup-recently-visited ol {
    margin: 0;
    padding-left: 18px;
}

.setup-recently-visited li + li {
    margin-top: 6px;
}

.setup-recently-visited a {
    color: #1f5f9f;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.setup-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.setup-toolbar select {
    max-width: 220px;
}

.setup-category-title {
    margin: 0 0 14px;
    color: #243a57;
    font-size: 18px;
}

.setup-empty-state {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px dashed #c9d8e7;
    border-radius: 12px;
    background: #fbfdff;
    color: #61758b;
    font-size: 12px;
    font-weight: 700;
}

.setup-links-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.setup-setting {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.setup-setting:hover {
    transform: translateY(-1px);
    border-color: #9ab7d3;
    box-shadow: 0 14px 28px rgba(31, 95, 159, 0.08);
}

.setup-setting-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: #ecf3fb;
    color: #205d97;
    font-size: 20px;
}

.setup-setting-content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.setup-setting-title {
    color: #243a57;
    font-size: 14px;
    font-weight: 800;
}

.setup-setting-desc {
    color: #61758b;
    font-size: 12px;
    line-height: 1.5;
}

.setup-setting-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dbeafb;
    color: #1d5f9f;
    font-size: 10px;
    font-weight: 800;
}

.setup-setting-badge.is-success {
    background: #dff5e7;
    color: #227246;
}

.setup-setting-badge.is-warning {
    background: #d3e9ff;
    color: #1f5a94;
}

.setup-setting-badge.is-info {
    background: #dbeafb;
    color: #1d5f9f;
}

.setup-edit-panels {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.setup-inline-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.setup-cron-box {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d6e2ee;
    border-radius: 14px;
    background: #f8fbfe;
}

.setup-cron-box p {
    margin: 0;
    color: #35506f;
    font-size: 12px;
}

.setup-cron-box button {
    width: fit-content;
}

.setup-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    background: rgba(18, 31, 47, 0.28);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.setup-drawer.hidden {
    display: none;
}

.setup-drawer.is-visible,
.setup-drawer.is-closing {
    opacity: 1;
}

.setup-drawer-card {
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 50px rgba(18, 31, 47, 0.24);
    transform: translateX(18px);
    transition: transform 0.18s ease;
}

.setup-drawer.is-visible .setup-drawer-card {
    transform: translateX(0);
}

.setup-drawer.is-closing .setup-drawer-card {
    transform: translateX(18px);
}

.setup-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.setup-drawer-head h2 {
    margin: 0;
    color: #243a57;
    font-size: 18px;
}

.setup-drawer-close {
    border: 0;
    background: transparent;
    color: #5f738a;
    font-size: 24px;
    line-height: 1;
}

.setup-task-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.setup-task-list li + li {
    margin-top: 6px;
}

.setup-task-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #35506f;
    text-decoration: none;
}

.setup-task-list a:hover {
    background: #f3f7fb;
}

.setup-task-list i {
    margin-top: 1px;
    font-size: 16px;
}

.setup-task-list .is-done {
    color: #249059;
}

.setup-task-list .is-pending {
    color: #c75656;
}

body.setup-drawer-open {
    overflow: hidden;
}

.settings-general-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.settings-general-head h1 {
    margin: 0;
    color: #1f3552;
    font-size: 20px;
}

.settings-general-form {
    display: grid;
    gap: 14px;
}

.settings-general-tabs {
    margin-bottom: 0;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.is-active {
    display: block;
}

.settings-form-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--client-summary-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.settings-form-table tr + tr {
    border-top: 1px solid #eaf0f6;
}

.settings-form-table .fieldlabel {
    width: 240px;
    min-width: 220px;
    padding: 12px 14px;
    background: #f7fafd;
    color: #36506e;
    font-size: 12px;
    font-weight: 800;
    vertical-align: top;
}

.settings-form-table .fieldarea {
    padding: 12px 14px;
    color: #5c7087;
    font-size: 12px;
    line-height: 1.6;
}

.settings-form-table .fieldarea .form-control {
    margin-bottom: 6px;
}

.settings-form-table .fieldarea .checkbox-inline,
.settings-form-table .fieldarea .radio-inline {
    display: inline-block;
    margin-bottom: 6px;
}

@media (min-width: 1280px) {
    .setup-links-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .client-summary-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .form-grid-2,
    .article-list-2,
    .plan-grid,
    .detail-grid,
    .stats-grid,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .thread-card header,
    .order-card,
    .inline-form,
    .service-toolbar,
    .invoice-sheet-header {
        flex-direction: column;
    }

    .dashboard-main-body {
        padding: 16px;
    }

    .panel table {
        min-width: 560px;
    }

    .impersonation-bar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-meta-grid {
        grid-template-columns: 1fr;
    }

    .service-shell-top {
        flex-direction: column;
    }

    .mail-template-header,
    .mail-template-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-orders-header,
    .admin-orders-bulk-bar,
    .client-summary-header {
        flex-direction: column;
        align-items: stretch;
    }

    .client-summary-grid-4,
    .client-profile-toggle-grid {
        grid-template-columns: 1fr;
    }

    .invoice-admin-filter-grid,
    .invoice-detail-summary-grid,
    .invoice-ledger-grid,
    .invoice-credit-grid,
    .setup-links-container,
    .system-settings-index {
        grid-template-columns: 1fr;
    }

    .invoice-detail-head,
    .invoice-detail-tools,
    .invoice-detail-tools-top,
    .invoice-panel-actions,
    .invoice-inline-actions,
    .invoice-bulk-actions,
    .invoice-row-actions {
        align-items: stretch;
    }

    .admin-orders-filter,
    .client-summary-grid,
    .client-summary-metrics,
    .client-summary-actions-grid,
    .client-action-links {
        grid-template-columns: 1fr;
    }

    .client-service-head,
    .client-inline-link-field,
    .client-domain-period-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-service-command-grid {
        grid-template-columns: 1fr;
    }

    .mail-template-action-body {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .template-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .template-settings-row,
    .template-settings-field-inline,
    .template-settings-field-help,
    .template-subject-row,
    .template-merge-layout {
        grid-template-columns: 1fr;
    }

    .template-settings-label {
        text-align: left;
        padding-bottom: 0;
    }

    .setup-hero,
    .setup-progress-row {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-form-table,
    .settings-form-table tbody,
    .settings-form-table tr,
    .settings-form-table td {
        display: block;
        width: 100%;
    }

    .settings-form-table .fieldlabel {
        min-width: 0;
    }

    .setup-progress-banner {
        min-width: 0;
    }
}

@media (max-width: 1200px) {
    .client-summary-grid-4 {
        grid-template-columns: 1fr;
    }

    .invoice-detail-head,
    .invoice-admin-client-head {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-detail-tools-top {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .client-summary-header h1 {
        font-size: 16px;
    }

    .client-summary-card h2,
    .invoice-admin-card h2 {
        font-size: 15px;
    }

    .client-summary-card h3 {
        font-size: 12px;
    }

    .setup-hero h1,
    .settings-general-head h1,
    .setup-category-title,
    .setup-drawer-head h2 {
        font-size: 16px;
    }

    .setup-setting {
        padding: 14px;
    }

    .invoice-detail-tabs {
        gap: 6px;
    }

    .invoice-detail-tabs button {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 11px;
    }
}

.ticket-layout {
    align-items: start;
}

.ticket-compose-panel,
.ticket-history-panel,
.domain-search-results-panel {
    background: #fff;
    border: 1px solid #d8e1ee;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
}

.domain-search-results-panel {
    padding: 18px 20px;
}

.ticket-layout .panel {
    padding: 18px;
}

.ticket-panel-heading,
.domain-search-results-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 14px;
}

.domain-search-results-head {
    padding-left: 4px;
}

#domainSearchResults {
    position: relative;
    min-height: 120px;
}

#domainSearchResults.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

#domainSearchResults.is-loading::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(15, 77, 162, 0.2);
    border-top-color: #0f4da2;
    animation: domain-search-spin 0.8s linear infinite;
}

.ticket-panel-heading h2,
.domain-search-results-head h3 {
    margin: 0;
}

.domain-search-results-head h3 {
    font-size: 18px;
    line-height: 1.2;
    color: #101828;
}

.ticket-panel-heading p,
.domain-search-results-head p {
    margin: 6px 0 0;
    color: #5b6474;
    font-size: 12px;
}

.domain-search-results-head p {
    max-width: 420px;
}

.ticket-compose-form select,
.ticket-compose-form input,
.ticket-compose-form textarea {
    width: 100%;
}

.ticket-compose-form {
    gap: 12px;
}

.ticket-compose-form label {
    color: #435a74;
    font-size: 12px;
    font-weight: 700;
}

.ticket-compose-form input,
.ticket-compose-form select,
.ticket-compose-form textarea {
    margin-top: 5px;
    min-height: 40px;
    border: 1px solid #d5e0ec;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #22354d;
    background: #fff;
}

.ticket-compose-form textarea {
    min-height: 140px;
    resize: vertical;
}

.ticket-compose-form small {
    display: block;
    margin-top: 6px;
    color: #6b7e93;
    font-size: 11px;
    font-weight: 500;
}

.ticket-editor {
    margin-top: 6px;
    border: 1px solid #d7e2ec;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.ticket-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #f6f9fc;
    border-bottom: 1px solid #e3eaf3;
}

.ticket-editor-toolbar button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #ccd8e6;
    border-radius: 8px;
    background: #fff;
    color: #2f4d70;
    font-size: 12px;
    font-weight: 700;
}

.ticket-editor textarea {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    min-height: 150px;
    box-shadow: none;
}

.ticket-related-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: #5f6b7d;
}

.ticket-related-meta span {
    background: #eef3fb;
    border: 1px solid #d9e4f5;
    border-radius: 999px;
    padding: 4px 10px;
}

.ticket-related-meta-admin {
    margin-bottom: 14px;
}

.ticket-history-panel .thread-card {
    padding: 14px;
    border-radius: 14px;
}

.ticket-history-panel .thread-card + .thread-card {
    margin-top: 12px;
}

.ticket-history-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    list-style: none;
    cursor: pointer;
}

.ticket-history-summary::-webkit-details-marker {
    display: none;
}

.ticket-history-summary strong {
    font-size: 14px;
    color: #213751;
}

.ticket-history-summary > span {
    font-size: 11px;
    color: #667b92;
}

.ticket-history-item[open] .ticket-history-summary {
    margin-bottom: 10px;
}

.ticket-history-content {
    border-top: 1px solid #e7edf5;
    padding-top: 10px;
}

.message-invoice-box {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #d9e4f5;
    border-radius: 12px;
    background: #f8fbff;
}

.message-invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.message-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-invoice-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #cdd9ea;
    background: #fff;
    color: #0f4da2;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.message-invoice-actions a:hover {
    background: #eef4ff;
    text-decoration: none;
}

.message {
    margin-top: 10px;
    padding: 12px 13px;
    border-radius: 12px;
    font-size: 13px;
}

.message strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #2f4867;
}

.message.client {
    background: #f7fafc;
    border: 1px solid #e1e9f1;
}

.ticket-message-body p,
.message-client-log p {
    margin: 0 0 8px;
}

.ticket-message-body p:last-child,
.message-client-log p:last-child {
    margin-bottom: 0;
}

.message-client-log a,
.ticket-message-body a {
    color: #0f4da2;
    text-decoration: underline;
    word-break: break-word;
}

.message.staff {
    background: #edf5ff;
    border: 1px solid #d6e6fb;
}

.ticket-message-body p,
.ticket-message-body ul,
.ticket-message-body blockquote {
    margin: 0 0 8px;
}

.ticket-message-body p:last-child,
.ticket-message-body ul:last-child,
.ticket-message-body blockquote:last-child {
    margin-bottom: 0;
}

.ticket-message-body ul {
    padding-left: 18px;
}

.ticket-message-body blockquote {
    padding: 8px 10px;
    border-left: 3px solid #8db0d6;
    background: #f5f9fd;
    color: #44627f;
}

.domain-search-shell {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(49, 159, 255, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f1f6fb 100%);
    border: 1px solid #dbe6f3;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.06);
}

.domain-search-hero {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.domain-search-hero-compact {
    display: block;
}

.domain-search-form-panel {
    display: grid;
    gap: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.domain-search-form-shell {
    display: grid;
    gap: 10px;
}

.domain-search-floating-label {
    display: inline-flex !important;
    align-items: center;
    color: #17305c !important;
    font-size: 12px;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.domain-search-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(170px, 0.7fr) auto;
    gap: 10px;
}

.domain-search-inputs-simple {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0;
    padding: 0 10px 0 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cad8ea;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.domain-search-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: #7b8ba6;
    font-size: 18px;
    background: transparent;
    border-radius: 999px;
}

.domain-search-inputs input,
.domain-search-inputs select {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #172033;
    font-size: 15px;
}

.domain-search-inputs input:focus,
.domain-search-inputs select:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.domain-search-inputs-simple:focus-within {
    background: #ffffff;
    border-color: #8db6f1;
    box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.10), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.domain-search-inputs-simple:focus-within .domain-search-input-icon {
    color: #2d6cdf;
    background: transparent;
}

.domain-search-inputs input::placeholder {
    color: #8ea0b7;
}

.domain-search-inputs-simple input {
    min-height: 60px;
    padding: 0 14px;
    border-radius: 0;
    font-size: 16px;
    box-shadow: none;
}

.domain-search-inputs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f4da2 0%, #1663c7 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 10px 20px rgba(15, 79, 184, 0.18);
}

.domain-search-inputs-simple button {
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    box-shadow: none;
}

.domain-search-inputs button:disabled {
    opacity: 1;
    cursor: wait;
}

.domain-search-button-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
    animation: domain-search-spin 0.8s linear infinite;
}

.domain-search-inputs button.is-loading .domain-search-button-spinner {
    display: inline-block;
}

.domain-search-inputs button.is-loading .domain-search-button-label {
    content: "";
}

.domain-search-inputs button.is-loading .domain-search-button-label::after {
    content: "Buscando...";
}

.domain-search-inputs button.is-loading .domain-search-button-label {
    font-size: 0;
}

.domain-search-note {
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.domain-search-note-dark {
    color: #5e6f86;
}

.domain-search-bundle-note {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
}

.domain-search-bundle-note-soft {
    background: #edf4ff;
    border: 1px solid #d8e6fb;
    color: #17305c;
}

.domain-search-price-strip {
    display: grid;
    gap: 12px;
}

.domain-search-price-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.domain-search-price-strip-head strong {
    font-size: 13px;
    color: #17325f;
}

.domain-search-price-strip-head span {
    font-size: 12px;
    color: #6b7b94;
}

.domain-search-price-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.domain-price-card {
    display: flex;
    min-height: 88px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #d8e1ee;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.domain-price-card.is-promo {
    border-color: #4c9ef0;
    box-shadow: 0 12px 28px rgba(76, 158, 240, 0.16);
}

.domain-price-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -24px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 50, 95, 0.08), transparent 72%);
}

.domain-price-card-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.domain-price-card-top,
.domain-price-card-bottom {
    display: flex;
    align-items: center;
}

.domain-price-card-top {
    justify-content: space-between;
    gap: 10px;
}

.domain-price-card-bottom {
    justify-content: flex-start;
    gap: 10px;
}

.domain-price-card strong {
    font-size: 16px;
    color: #17325f;
}

.domain-price-card span {
    font-size: 11px;
    color: #718198;
}

.domain-price-card b {
    font-size: 15px;
    color: #0f8c55;
}

.domain-price-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(48, 142, 237, 0.18);
    color: #5aa8f5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.domain-search-results-panel {
    display: grid;
    gap: 16px;
}

.domain-search-results-head h3 {
    margin: 0;
    color: #172033;
}

.domain-search-results-head p {
    margin: 4px 0 0;
    color: #6b7b94;
}

.domain-result-stack {
    display: grid;
    gap: 12px;
}

.domain-results-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.domain-results-overview strong {
    font-size: 14px;
    color: #17325f;
}

.domain-results-overview span {
    font-size: 12px;
    color: #607089;
}

.domain-result-group {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.domain-result-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.domain-result-group-head h4 {
    margin: 0;
    font-size: 15px;
    color: #172033;
}

.domain-result-group-head span {
    font-size: 12px;
    color: #6b7b94;
}

.domain-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid #d8e1ee;
    border-radius: 18px;
    background: #fff;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.domain-result-card:hover {
    border-color: #c7d6e8;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.domain-result-card.is-featured {
    border-color: #bfe5cf;
    background: linear-gradient(180deg, #fbfffc 0%, #f1fbf4 100%);
    box-shadow: 0 16px 34px rgba(15, 140, 85, 0.08);
}

.domain-result-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.domain-result-mark {
    flex: 0 0 auto;
}

.domain-result-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #0f8c55;
    color: #0f8c55;
    font-size: 15px;
    font-weight: 800;
    text-transform: lowercase;
}

.domain-result-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.domain-result-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.domain-result-main h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    color: #172033;
    overflow-wrap: anywhere;
}

.domain-result-main p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #5d6778;
}

.domain-result-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef3fb;
    color: #48627d;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.domain-result-status.is-available {
    background: #e8f7ef;
    color: #067647;
}

.domain-result-status.is-registered {
    background: #fff1f1;
    color: #b42318;
}

.domain-result-status.is-unknown {
    background: #dbedff;
    color: #004d9a;
}

.domain-result-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.domain-result-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #51657d;
    font-size: 11px;
    font-weight: 700;
}

.domain-result-chip.is-available {
    background: #e8f7ef;
    color: #067647;
}

.domain-result-chip.is-registered {
    background: #fff1f1;
    color: #b42318;
}

.domain-result-chip.is-unknown {
    background: #dbedff;
    color: #004d9a;
}

.domain-result-chip.is-highlight {
    background: #e7f0ff;
    color: #0f4fb8;
}

.domain-result-chip.is-warning {
    gap: 6px;
    background: #dbedff;
    color: #004d9a;
}

.domain-result-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.domain-result-price {
    text-align: right;
}

.domain-result-price span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #718198;
}

.domain-result-price strong {
    font-size: 17px;
    color: #17325f;
}

.domain-result-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.domain-result-actions form {
    margin: 0;
}

.domain-inline-form {
    display: grid;
    gap: 12px;
}

.domain-purchase-options {
    display: grid;
    gap: 10px;
    min-width: 280px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #dbe7f8;
}

.domain-purchase-options label {
    display: grid;
    gap: 6px;
    color: #17325f;
    font-size: 12px;
    font-weight: 600;
}

.domain-purchase-options select,
.domain-purchase-options textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cad6e5;
    border-radius: 10px;
    background: #fff;
    color: #172033;
    font-size: 13px;
}

.domain-add-hosting-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.domain-add-hosting-row input {
    width: auto;
}

.domain-hosting-bundle {
    display: grid;
    gap: 10px;
}

.domain-result-actions button,
.domain-result-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #17325f;
    color: #fff;
    text-decoration: none;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}

.domain-more-toggle {
    justify-self: start;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #cfdced;
    border-radius: 999px;
    background: #fff;
    color: #17325f;
    font-size: 12px;
    font-weight: 700;
}

.domain-more-results {
    display: grid;
    gap: 10px;
}

.domain-result-actions a.secondary {
    background: #eef3fb;
    color: #17325f;
}

.domain-search-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #b7ebc6;
}

.domain-search-empty-state {
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #d8e1ee;
}

.domain-search-empty-state h3 {
    color: #172033;
}

.domain-search-empty-state p {
    color: #5d6778;
}

.checkout-shell {
    display: grid;
    gap: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 79, 184, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.checkout-header h6 {
    margin: 6px 0 8px;
    font-size: 24px;
    color: #10213d;
}

.checkout-header p {
    margin: 0;
    max-width: 680px;
    color: #5d6980;
}

.checkout-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e7f0ff;
    color: #0f4fb8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.checkout-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cfe0ff;
    color: #0f4fb8;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.checkout-items-panel,
.checkout-summary-card,
.checkout-payment-form,
.checkout-status-card {
    background: #fff;
    border: 1px solid #dbe7f8;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.checkout-items-panel {
    overflow: hidden;
}

.checkout-table-shell {
    padding: 4px 0;
}

.checkout-table-shell table {
    min-width: 0;
}

.checkout-table-shell th {
    color: #49617f;
    background: #f8fbff;
}

.checkout-table-shell td strong {
    color: #10213d;
}

.checkout-price-badge {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f7ef;
    color: #0e8a53;
    font-weight: 700;
}

.checkout-summary-note {
    display: block;
    margin-top: 10px;
    color: #5d6980;
    line-height: 1.55;
}

.checkout-remove-button {
    background: #fff1f1 !important;
    color: #b42318 !important;
}

.checkout-sidebar {
    display: grid;
    gap: 18px;
}

.checkout-summary-card,
.checkout-payment-form {
    padding: 22px;
}

.checkout-summary-card h3,
.checkout-payment-head h3 {
    margin: 0 0 6px;
    color: #10213d;
}

.checkout-payment-head p {
    margin: 0 0 16px;
    color: #5d6980;
}

.checkout-total-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #ebf1f8;
    color: #49617f;
}

.checkout-total-line strong {
    color: #10213d;
}

.checkout-total-line.is-grand {
    padding-top: 16px;
    border-bottom: 0;
    font-size: 18px;
}

.checkout-total-line.is-grand strong {
    color: #0f4fb8;
    font-size: 24px;
}

.checkout-payment-options {
    display: grid;
    gap: 12px;
}

.checkout-payment-option {
    display: block !important;
    color: inherit !important;
    font-weight: 400 !important;
}

.checkout-payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-payment-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #dbe7f8;
    border-radius: 18px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.checkout-payment-option input:checked + .checkout-payment-card {
    border-color: #0f4fb8;
    box-shadow: 0 0 0 4px rgba(15, 79, 184, 0.12);
    transform: translateY(-1px);
}

.checkout-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.checkout-payment-icon-mpesa {
    background: linear-gradient(135deg, #10b981 0%, #0f8c55 100%);
}

.checkout-payment-icon-paypal {
    background: linear-gradient(135deg, #0070d1 0%, #0f4fb8 100%);
}

.checkout-payment-icon-bank-transfer {
    background: linear-gradient(135deg, #17325f 0%, #24477f 100%);
}

.checkout-payment-copy {
    display: grid;
    gap: 4px;
}

.checkout-payment-copy strong {
    color: #10213d;
}

.checkout-payment-copy small {
    color: #5d6980;
    line-height: 1.5;
}

.checkout-submit-button {
    min-height: 52px;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #0f4fb8 0%, #173f96 100%) !important;
    box-shadow: 0 18px 34px rgba(15, 79, 184, 0.22);
}

.checkout-method-status {
    display: grid;
    gap: 12px;
}

.checkout-status-card {
    padding: 16px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.checkout-status-card span {
    display: block;
    margin-bottom: 5px;
    color: #5d6980;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.checkout-status-card strong {
    color: #10213d;
}

@keyframes domain-search-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .domain-search-hero,
    .checkout-layout,
    .checkout-header,
    .domain-search-inputs,
    .domain-result-card {
        grid-template-columns: 1fr;
    }

    .domain-search-topnav,
    .domain-search-price-strip-head,
    .domain-results-overview,
    .domain-result-group-head,
    .domain-result-title-row,
    .domain-result-side {
        align-items: flex-start;
        justify-content: flex-start;
        flex-direction: column;
    }

    .domain-search-shell-dark {
        padding: 18px;
        border-radius: 24px;
    }

    .domain-search-inputs-simple {
        grid-template-columns: 1fr;
        padding: 10px;
        border-radius: 22px;
    }

    .domain-search-input-icon {
        display: none;
    }

    .domain-search-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkout-header {
        display: grid;
    }

    .domain-result-actions {
        justify-items: stretch;
    }

    .domain-purchase-options {
        min-width: 0;
    }

    .domain-search-inputs-simple input {
        min-height: 52px;
        padding: 0 12px;
        border-radius: 14px;
    }

    .domain-search-inputs-simple button {
        width: 100%;
        border-radius: 14px;
    }

    .domain-price-card {
        min-height: 86px;
    }

    .domain-result-card.is-featured {
        border-radius: 28px;
    }
}

@media (max-width: 640px) {
    .domain-search-price-grid {
        grid-template-columns: 1fr;
    }
}
