/* ============================================================
   SEA Host — Components (buttons, forms, tables, badges, alerts,
   modals, pagination, dashboard, auth, tickets, kb, invoices)
   Purple identity • larger, high-contrast type
   ============================================================ */

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    font-family: var(--sea-font);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    border-radius: var(--sea-radius-sm);
    padding: 10px 20px;
    border: 1px solid transparent;
    transition: background-color var(--sea-speed) var(--sea-ease),
                border-color var(--sea-speed) var(--sea-ease),
                color var(--sea-speed) var(--sea-ease),
                box-shadow var(--sea-speed) var(--sea-ease),
                transform var(--sea-speed) var(--sea-ease);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn:focus, .btn:active:focus { outline-offset: 2px; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-primary,
.btn-primary.btn-default {
    background: var(--sea-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sea-shadow-primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary.btn-default:hover, .btn-primary.btn-default:focus, .btn-primary.btn-default:active {
    background: var(--sea-primary-hover);
    border-color: transparent;
    color: #fff;
}

/* Default / secondary */
.btn-default {
    background: var(--sea-surface);
    border-color: var(--sea-border-strong);
    color: var(--sea-text);
}
.btn-default:hover, .btn-default:focus, .btn-default:active {
    background: var(--sea-surface-alt);
    border-color: var(--sea-primary);
    color: var(--sea-primary);
}

/* Success */
.btn-success { background: var(--sea-success); border-color: var(--sea-success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background: #6d28d9; border-color: #6d28d9; color: #fff; }

/* Info */
.btn-info { background: var(--sea-info); border-color: var(--sea-info); color: #fff; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background: #0369a1; border-color: #0369a1; color: #fff; }

/* Warning */
.btn-warning { background: var(--sea-warning); border-color: var(--sea-warning); color: #fff; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: #b45309; border-color: #b45309; color: #fff; }

/* Danger */
.btn-danger { background: var(--sea-danger); border-color: var(--sea-danger); color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* Outline / ghost */
.btn-outline { background: transparent; border-color: var(--sea-primary); color: var(--sea-primary); }
.btn-outline:hover, .btn-outline:focus, .btn-outline:active { background: var(--sea-primary); border-color: var(--sea-primary); color: #fff; }

/* Sizes */
.btn-xs { padding: 5px 12px; font-size: 0.82rem; border-radius: var(--sea-radius-sm); }
.btn-sm { padding: 7px 15px; font-size: 0.88rem; border-radius: var(--sea-radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; border-radius: var(--sea-radius-md); }
.btn-block { display: block; width: 100%; }

.btn-input-padded-responsive { padding-left: 20px; padding-right: 20px; }
@media (min-width: 500px) { .btn-input-padded-responsive { padding-left: 36px; padding-right: 36px; } }

.btn-custom-action { display: inline-flex; align-items: center; gap: 8px; }
.btn .loading { margin-left: 6px; }

/* ============================================================
   Forms
   ============================================================ */

.form-control {
    border: 1px solid var(--sea-border-strong);
    border-radius: var(--sea-radius-sm);
    padding: 10px 14px;
    font-size: 0.98rem;
    height: auto;
    color: var(--sea-text);
    background: var(--sea-surface);
    box-shadow: none;
    transition: border-color var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease);
}
.form-control:focus {
    border-color: var(--sea-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
    outline: 0;
}
.form-control[disabled], .form-control[readonly] { background: var(--sea-surface-alt); cursor: not-allowed; }

select.form-control { height: auto; }
textarea.form-control { resize: vertical; }

.form-group { margin-bottom: 18px; }
.form-group label,
.form-group .control-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--sea-text);
    margin-bottom: 6px;
}
.form-inline .form-group { margin-bottom: 12px; }

.form-group.prepend-icon { position: relative; }
.form-group.prepend-icon .form-control.field,
.form-group.prepend-icon input.field,
.form-group.prepend-icon select.field { padding-left: 42px; }
.form-group.prepend-icon label.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sea-text-faint);
    font-size: 0.95rem;
    margin: 0;
    pointer-events: none;
    z-index: 3;
}

.has-error .form-control { border-color: var(--sea-danger); }
.has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.has-error .help-block, .has-error .control-label,
.form-group .field-error-msg { color: var(--sea-danger); font-size: 0.88rem; }
.form-group .field-error-msg { display: none; }

.has-success .form-control { border-color: var(--sea-success); }
.has-success .form-control:focus { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12); }

.input-group .form-control { border-right: 0; }
.input-group .input-group-btn .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group .input-group-addon { background: var(--sea-surface-alt); border-color: var(--sea-border-strong); color: var(--sea-text-muted); }

.checkbox, .radio { margin: 0 0 10px; }
.checkbox label, .radio label { font-size: 0.95rem; font-weight: 500; color: var(--sea-text); padding-left: 24px; }
.checkbox input[type="checkbox"], .radio input[type="radio"] {
    width: 16px; height: 16px;
    accent-color: var(--sea-primary);
    vertical-align: -2px;
    margin-left: -24px;
}

.bootstrap-switch { border: 1px solid var(--sea-border-strong); border-radius: var(--sea-radius-pill); box-shadow: none; }
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success { background: var(--sea-success); }

.password-strength-meter .progress { height: 8px; border-radius: var(--sea-radius-pill); background: var(--sea-border); overflow: hidden; }
.password-strength-meter .progress-bar { background: var(--sea-success); }

/* ============================================================
   Tables
   ============================================================ */

.table { font-size: 0.95rem; color: var(--sea-text); }
.table > thead > tr > th {
    border-bottom: 1px solid var(--sea-border);
    font-weight: 650;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sea-text-muted);
    padding: 13px 14px;
    white-space: nowrap;
}
.table > tbody > tr > td {
    border-top: 1px solid var(--sea-border);
    padding: 13px 14px;
    vertical-align: middle;
}
.table > tbody > tr:hover > td { background: var(--sea-surface-alt); }
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > td { padding: 9px 11px; }

.table-list { width: 100% !important; }
table.table-list thead th { background: var(--sea-surface); border-bottom: 2px solid var(--sea-border); color: var(--sea-text-muted); }
.table-list > tbody > tr { cursor: pointer; }
.table-list > tbody > tr > td { background: var(--sea-surface); }
.table-list > tbody > tr:nth-child(even) > td { background: #fbfaff; }
.table-list > tbody > tr:hover > td { background: var(--sea-primary-soft) !important; }

.table-responsive { border: 0; -webkit-overflow-scrolling: touch; }

/* Tables sit in a softly bordered card so they seat cleanly in the content area */
.table-container {
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    box-shadow: var(--sea-shadow-sm);
    overflow: auto;
}

/* DataTables */
.dataTables_wrapper .dataTables_info {
    background: var(--sea-ink-2);
    color: #efe9ff;
    font-size: 0.9rem;
    border-radius: var(--sea-radius-sm) var(--sea-radius-sm) 0 0;
}
div.dataTables_wrapper div.dataTables_info { padding: 13px 18px !important; font-weight: 450; }
.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper .dataTables_filter label {
    margin: 0;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dataTables_wrapper .dataTables_filter label .form-control {
    width: 220px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-sm);
    font-size: 0.9rem;
    padding: 6px 13px;
    height: auto;
}
.dataTables_wrapper .dataTables_paginate { float: right; padding: 14px 4px 6px; }
.dataTables_wrapper table.table-list thead th { border-bottom: 2px solid var(--sea-border); }

/* Pagination */
.pagination { margin: 14px 0; font-size: 0.9rem; }
.pagination > li > a,
.pagination > li > span {
    color: var(--sea-text-muted);
    border-color: var(--sea-border);
    padding: 8px 14px;
    font-weight: 500;
    background: var(--sea-surface);
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus {
    background: var(--sea-primary-soft);
    border-color: var(--sea-primary);
    color: var(--sea-primary);
}
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus,
.pagination > .active > span,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
    background: var(--sea-primary);
    border-color: var(--sea-primary);
    color: #fff;
}
.pagination > .disabled > a, .pagination > .disabled > a:hover,
.pagination > .disabled > span { color: var(--sea-text-faint); background: var(--sea-surface); }

.dataTables_wrapper .dataTables_length { font-size: 0.88rem; color: var(--sea-text-muted); padding-top: 8px; }

/* ============================================================
   Alerts
   ============================================================ */

.alert {
    border: 0;
    border-left: 4px solid;
    border-radius: var(--sea-radius-md);
    padding: 15px 19px;
    font-size: 0.98rem;
    box-shadow: var(--sea-shadow-sm);
    margin-bottom: 22px;
}
.alert h2, .alert h4 { margin-top: 0; font-size: 1.05rem; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert strong { font-weight: 650; }

.alert-success { background: var(--sea-success); border-color: var(--sea-success); color: #fff; }
.alert-info { background: var(--sea-info-soft); border-color: var(--sea-info); color: #075985; }
.alert-warning { background: var(--sea-warning-soft); border-color: var(--sea-warning); color: #92400e; }
.alert-danger, .alert-error { background: var(--sea-danger-soft); border-color: var(--sea-danger); color: #991b1b; }

.alert-dismissible .close { color: inherit; opacity: 0.55; }
.alert-dismissible .close:hover { opacity: 0.9; }

/* ============================================================
   Status badges
   ============================================================ */

.label.status,
.label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.45;
    padding: 5px 12px;
    border-radius: var(--sea-radius-pill);
    background: var(--sea-neutral-soft);
    color: var(--sea-text-muted);
    border: 0;
}
.label-success { background: var(--sea-success); color: #fff; }
.label-info { background: var(--sea-info-soft); color: var(--sea-info); }
.label-warning { background: var(--sea-warning-soft); color: var(--sea-warning); }
.label-danger { background: var(--sea-danger-soft); color: var(--sea-danger); }
.label-default { background: var(--sea-neutral-soft); color: var(--sea-text-muted); }

.status-pending, .status-collections { background: var(--sea-danger-soft); color: var(--sea-danger); }
.status-pending-transfer { background: var(--sea-warning-soft); color: #a16207; }
.status-active, .status-open, .status-completed, .status-paid, .status-accepted, .status-delivered { background: var(--sea-success); color: #fff; }
.status-suspended, .status-pending-registration, .status-redemption { background: var(--sea-warning-soft); color: var(--sea-warning); }
.status-customer-reply { background: var(--sea-warning-soft); color: #d97706; }
.status-fraud, .status-answered, .status-terminated { background: var(--sea-neutral-soft); color: var(--sea-text-muted); }
.status-expired, .status-transferred-away { background: var(--sea-info-soft); color: var(--sea-info); }
.status-grace { background: var(--sea-warning-soft); color: #b45309; }
.status-cancelled { background: var(--sea-neutral-soft); color: var(--sea-text-muted); }
.status-onhold { background: var(--sea-info-soft); color: var(--sea-info); }
.status-inprogress { background: var(--sea-danger-soft); color: var(--sea-danger); }
.status-closed { background: var(--sea-neutral-soft); color: var(--sea-text-muted); }
.status-unpaid { background: var(--sea-danger-soft); color: var(--sea-danger); }
.status-refunded { background: var(--sea-info-soft); color: var(--sea-info); }
.status-lost, .status-dead { background: var(--sea-neutral-soft); color: var(--sea-text); }
.status-custom { background: rgba(124, 58, 237, 0.10); color: var(--sea-primary-strong); }

.label.requestor-type-operator { background: var(--sea-info-soft); color: var(--sea-info); }
.label.requestor-type-owner { background: var(--sea-success); color: #fff; }
.label.requestor-type-authorizeduser,
.label.requestor-type-subaccount { background: var(--sea-neutral-soft); color: var(--sea-text-muted); }
.label.requestor-type-registereduser { background: var(--sea-warning-soft); color: var(--sea-warning); }
.label.requestor-type-guest { background: var(--sea-neutral-soft); color: var(--sea-text-faint); }

/* ============================================================
   Modals
   ============================================================ */

.modal-content { border: 0; border-radius: var(--sea-radius-lg); box-shadow: var(--sea-shadow-lg); background: var(--sea-surface); }
.modal-header { border-bottom: 1px solid var(--sea-border); padding: 19px 26px; }
.modal-header .modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-header .close { color: var(--sea-text-muted); opacity: 0.7; font-size: 1.5rem; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 24px 26px; }
.modal-footer {
    border-top: 1px solid var(--sea-border);
    background: var(--sea-surface-alt);
    border-radius: 0 0 var(--sea-radius-lg) var(--sea-radius-lg);
    padding: 15px 26px;
}
.modal-backdrop.in { opacity: 0.6; }
.modal-backdrop { background: var(--sea-ink); }
.modal.fade .modal-dialog { transform: translateY(-14px); transition: transform 0.22s var(--sea-ease); }
.modal.in .modal-dialog { transform: none; }

/* ============================================================
   Tabs
   ============================================================ */

.nav-tabs { border-bottom: 1px solid var(--sea-border); margin-bottom: 22px; }
.nav-tabs > li > a {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--sea-text-muted);
    font-size: 0.95rem;
    font-weight: 550;
    padding: 11px 18px;
    margin-right: 4px;
    transition: color var(--sea-speed) var(--sea-ease), border-color var(--sea-speed) var(--sea-ease);
}
.nav-tabs > li > a:hover { background: transparent; color: var(--sea-primary); border-color: transparent; }
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border: 0;
    border-bottom: 2px solid var(--sea-primary);
    color: var(--sea-primary);
    background: transparent;
    font-weight: 650;
}
.tab-content > .tab-pane { padding-top: 4px; }

/* ============================================================
   Dropdowns / list groups
   ============================================================ */

.dropdown-menu {
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    box-shadow: var(--sea-shadow-md);
    padding: 6px;
    font-size: 0.95rem;
}
.dropdown-menu > li > a { padding: 9px 13px; border-radius: var(--sea-radius-sm); color: var(--sea-text); font-weight: 500; }
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background: var(--sea-primary-soft); color: var(--sea-primary); }
.dropdown-menu .divider { background: var(--sea-border); margin: 6px 0; }

.list-group { border-radius: var(--sea-radius-md); }
.list-group-item { border-color: var(--sea-border); background: var(--sea-surface); font-size: 0.95rem; }
.list-group-item.active, .list-group-item.active:hover { background: var(--sea-primary); border-color: var(--sea-primary); }
.list-group-item .badge { background: var(--sea-primary-soft); color: var(--sea-primary); }
.list-group-item.active .badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

.badge { background: var(--sea-primary-soft); color: var(--sea-primary); font-weight: 650; padding: 4px 10px; border-radius: var(--sea-radius-pill); }
.navbar .badge { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ============================================================
   Dashboard tiles
   ============================================================ */

.tiles {
    margin: 0 0 26px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.tiles .row { display: contents; }
.tiles .tile {
    position: relative;
    margin: 0;
    padding: 24px 22px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    box-shadow: var(--sea-shadow-sm);
    transition: transform var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease), border-color var(--sea-speed) var(--sea-ease);
}
.tiles .tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--sea-shadow-md);
    border-color: var(--sea-primary);
}
.tiles .tile a { display: block; text-decoration: none; position: relative; z-index: 1; }
.tiles .tile a:hover { color: inherit; }
.tiles .tile .icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.35rem;
    color: #ffffff;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sea-radius-md);
    background: var(--sea-gradient);
    box-shadow: var(--sea-shadow-primary);
}
.tiles .tile .stat {
    margin: 6px 0 2px;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--sea-ink);
    letter-spacing: -0.02em;
}
.tiles .tile .title {
    font-weight: 600;
    color: var(--sea-text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 5px;
}
.tiles .tile .highlight { display: none; }
.tiles .tile:last-child { margin: 0; border-right: 1px solid var(--sea-border); }

.home-kb-search { margin-bottom: 18px; position: relative; }
.home-kb-search .form-control { padding-left: 46px; border-radius: var(--sea-radius-md); font-size: 1rem; }
.home-kb-search i { left: 18px; top: 50%; transform: translateY(-50%); color: var(--sea-text-faint); }

/* Welcome hero */
.sea-welcome {
    background: linear-gradient(120deg, var(--sea-ink) 0%, #4c1d95 55%, #6d28d9 100%);
    border-radius: var(--sea-radius-lg);
    padding: 30px 32px;
    margin-bottom: 26px;
    color: #ece4ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.sea-welcome::after {
    content: "SEA";
    position: absolute;
    right: -10px;
    top: -46px;
    font-size: 10rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: -0.05em;
    pointer-events: none;
}
.sea-welcome h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; }
.sea-welcome p { margin: 0; color: #cfbff6; font-size: 1rem; max-width: 640px; }
.sea-welcome .sea-welcome-actions { display: flex; gap: 10px; position: relative; z-index: 2; flex-wrap: wrap; }

/* Quick actions */
.sea-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.sea-quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 18px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    box-shadow: var(--sea-shadow-sm);
    color: var(--sea-text);
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease), border-color var(--sea-speed) var(--sea-ease);
}
.sea-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--sea-shadow-md);
    border-color: var(--sea-primary);
    color: var(--sea-text);
}
.sea-quick-action .sea-icon-badge { width: 40px; height: 40px; }

/* Wallet banner */
.sea-wallet-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: var(--sea-gradient);
    border-radius: var(--sea-radius-md);
    color: #ffffff;
    box-shadow: var(--sea-shadow-primary);
    flex-wrap: wrap;
    text-decoration: none;
}
.sea-wallet-banner:hover { color: #ffffff; }
.sea-wallet-banner .sea-wallet-label { display: flex; align-items: center; gap: 14px; font-size: 1rem; font-weight: 500; }
.sea-wallet-banner .sea-wallet-label i { font-size: 1.4rem; opacity: 0.9; }
.sea-wallet-banner .sea-wallet-amount { font-size: 1.4rem; font-weight: 800; }
.sea-wallet-banner .btn { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.sea-wallet-banner .btn:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }

/* ============================================================
   Empty states
   ============================================================ */

.sea-empty {
    text-align: center;
    padding: 50px 24px;
    background: var(--sea-surface);
    border: 1px dashed var(--sea-border-strong);
    border-radius: var(--sea-radius-md);
}
.sea-empty .sea-empty-icon {
    width: 68px; height: 68px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sea-radius-lg);
    background: var(--sea-primary-soft);
    color: var(--sea-primary);
    font-size: 1.7rem;
}
.sea-empty h4 { margin: 0 0 6px; font-size: 1.1rem; }
.sea-empty p { color: var(--sea-text-muted); margin: 0 0 18px; max-width: 440px; margin-left: auto; margin-right: auto; }

/* ============================================================
   Product / service pages
   ============================================================ */

div.product-details .product-icon { background: var(--sea-primary-soft); border-radius: var(--sea-radius-lg); color: var(--sea-primary); padding: 28px; }
div.product-details .product-icon h3 { color: var(--sea-text); margin-top: 12px; }
div.product-details .product-icon h4 { color: var(--sea-text-muted); }

.product-status { border-radius: var(--sea-radius-lg); }
.product-status-pending { background: var(--sea-highlight); }
.product-status-active { background: var(--sea-success); }
.product-status-suspended { background: var(--sea-info); }
.product-status-terminated, .product-status-cancelled { background: var(--sea-text-muted); }
.product-status-fraud { background: var(--sea-text); }
.product-status-text {
    padding: 8px;
    border-radius: 0 0 var(--sea-radius-lg) var(--sea-radius-lg);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

div.product-details-tab-container {
    border: 1px solid var(--sea-border);
    border-top: 0;
    border-radius: 0 0 var(--sea-radius-md) var(--sea-radius-md);
    background: var(--sea-surface);
    padding: 24px;
}
.module-client-area { padding: 10px 0 0; font-size: 1rem; }
div.product-details h4 { margin-top: 20px; font-size: 0.9rem; color: var(--sea-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   Ticket conversation
   ============================================================ */

.ticket-reply {
    margin: 0 0 18px;
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    background: var(--sea-surface);
    box-shadow: var(--sea-shadow-sm);
    overflow: hidden;
}
.ticket-reply.staff { border-color: #ddd6fe; border-left: 4px solid var(--sea-info); }
.ticket-reply:not(.staff) { border-left: 4px solid var(--sea-primary); }
.ticket-reply .user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    background: var(--sea-surface-alt);
    border-bottom: 1px solid var(--sea-border);
}
.ticket-reply.staff .user { background: var(--sea-info-soft); }
.ticket-reply .user > i { float: none; font-size: 1.3rem; color: var(--sea-text-faint); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 50%; }
.ticket-reply .user .name { font-weight: 650; font-size: 0.95rem; }
.ticket-reply .user .type { font-weight: 500; color: var(--sea-text-muted); }
.ticket-reply .date { float: right; color: var(--sea-text-faint); font-size: 0.86rem; padding: 2px 0 0; }
.ticket-reply .message { padding: 18px 20px; font-size: 1rem; line-height: 1.7; }
.ticket-reply .attachments { background: var(--sea-surface-alt); border-top: 1px dashed var(--sea-border-strong); font-size: 0.9rem; }
.ticket-reply .attachments ul { padding-left: 20px; }

/* ============================================================
   Knowledgebase
   ============================================================ */

.kb-search { margin-bottom: 28px; }
.kb-search .form-control { height: 52px; border-radius: var(--sea-radius-md) 0 0 var(--sea-radius-md); font-size: 1.05rem; }
.kb-search .input-group-btn .btn { height: 52px; border-radius: 0 var(--sea-radius-md) var(--sea-radius-md) 0; }

.kbcategories .col-sm-4 { display: inline-block; }
.kbcategories .col-sm-4 > a:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    box-shadow: var(--sea-shadow-sm);
    padding: 20px 22px;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--sea-text);
    font-size: 1.05rem;
    transition: transform var(--sea-speed) var(--sea-ease), border-color var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease);
}
.kbcategories .col-sm-4 > a:first-child:hover { transform: translateY(-2px); border-color: var(--sea-primary); box-shadow: var(--sea-shadow-md); color: var(--sea-primary); }
.kbcategories .col-sm-4 > a:first-child i {
    font-size: 1.5rem;
    color: #ffffff;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sea-gradient);
    box-shadow: var(--sea-shadow-primary);
    border-radius: var(--sea-radius-md);
    flex-shrink: 0;
}
.kbcategories .col-sm-4 > p { padding: 0 22px 18px; color: var(--sea-text-muted); font-size: 0.92rem; }
.kbcategories .col-sm-4 .admin-inline-edit { position: relative; top: -26px; margin-left: 10px; }

.kbarticles a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-md);
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--sea-text);
    transition: border-color var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease);
}
.kbarticles a:hover { border-color: var(--sea-primary); box-shadow: var(--sea-shadow-md); color: var(--sea-primary); }
.kbarticles a .glyphicon { color: var(--sea-primary); }
.kbarticles a p { margin: 4px 0 0; font-weight: 400; color: var(--sea-text-muted); font-size: 0.9rem; }

.kb-article-category {
    display: inline-block;
    background: var(--sea-primary-soft);
    color: var(--sea-primary);
    border-radius: var(--sea-radius-pill);
    padding: 6px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ============================================================
   Auth
   ============================================================ */

.logincontainer {
    max-width: 480px;
    margin: 48px auto 80px;
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-lg);
    box-shadow: var(--sea-shadow-lg);
    padding: 38px 36px 28px;
}
.logincontainer.with-social { max-width: 760px; }
@media (min-width: 768px) {
    .logincontainer.with-social .login-form { padding-right: 36px; border-right: 1px solid var(--sea-border); }
}
.logincontainer .login-form { padding-top: 4px; }
.logincontainer .form-control { height: auto; }
.logincontainer .btn { width: 100%; margin-bottom: 8px; }
.logincontainer .btn + .btn { margin-top: 8px; }
.logincontainer .checkbox { margin: 14px 0; }
.logincontainer .social-signin-btns .btn { display: block; width: 100%; margin: 6px 0; }

.sea-auth-brand { text-align: center; margin-bottom: 22px; }
.sea-auth-brand .sea-auth-logo { max-height: 56px; margin-bottom: 14px; }
.sea-auth-brand h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sea-auth-brand p { color: var(--sea-text-muted); margin: 0; font-size: 0.98rem; }

#registration { max-width: 900px; margin: 0 auto; }
.password-strength-meter { margin-top: 8px; }
.marketing-email-optin { background: var(--sea-surface-alt); border: 1px solid var(--sea-border); border-radius: var(--sea-radius-md); padding: 18px 20px; margin: 18px 0; }
.marketing-email-optin h4 { margin-top: 0; }
.tospanel.panel-danger { border-color: var(--sea-danger); }

.password-reset-form { max-width: 500px; margin: 30px auto; }

.twofa-module { border-color: var(--sea-border); border-radius: var(--sea-radius-md); }
.twofa-setup .backup-code { background: var(--sea-surface-alt); color: var(--sea-text); border-radius: var(--sea-radius-sm); }

/* ============================================================
   Invoices
   ============================================================ */

.invoice-container { background: var(--sea-surface); border: 1px solid var(--sea-border); border-radius: var(--sea-radius-lg); box-shadow: var(--sea-shadow-sm); padding: 38px 42px; margin-top: 26px; }
.invoice-summary { background: var(--sea-surface-alt); border: 1px dashed var(--sea-border-strong); border-radius: var(--sea-radius-md); }
.invoice-summary-table td.total-row { background: var(--sea-primary-soft); font-weight: 700; color: var(--sea-primary); }

/* ============================================================
   Announcements / misc
   ============================================================ */

div.announcement-single .title { font-weight: 700; font-size: 1.35rem; }
.announcement-single blockquote { border-left: 3px solid var(--sea-primary); padding: 12px 18px; background: var(--sea-surface-alt); border-radius: 0 var(--sea-radius-sm) var(--sea-radius-sm) 0; }

.affiliate-stat { color: var(--sea-text); }
.stat-boxes .stat-box { border-radius: var(--sea-radius-md); border: 1px solid var(--sea-border); }

/* ============================================================
   Error pages
   ============================================================ */

.sea-error { max-width: 580px; margin: 60px auto; text-align: center; padding: 48px 32px; }
.sea-error .sea-error-code {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: var(--sea-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.sea-error h2 { color: var(--sea-text); }
.sea-error p { color: var(--sea-text-muted); }

.error-container.boxed {
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-lg);
    box-shadow: var(--sea-shadow-md);
    padding: 48px 38px;
    margin: 40px auto;
    max-width: 640px;
    text-align: center;
}
.error-container.boxed h1 i { color: var(--sea-warning); }
.error-container.boxed h1 { font-size: 2rem; }
.error-container.boxed h3 { font-size: 1.2rem; }
.error-container.boxed p { font-size: 1rem; }
.error-container .buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ============================================================
   Misc WHMCS-specific preserved patterns
   ============================================================ */

.input-inline { display: inline-block; }
.input-inline-100 { width: 100px; }
.select-inline { display: inline-block; width: auto; }

.compact-control-bar { background: var(--sea-surface-alt); border: 1px solid var(--sea-border); border-radius: var(--sea-radius-sm); }

div.sidebar .list-group-item-selected { background: var(--sea-sidebar-active); color: #fff; border-radius: var(--sea-radius-sm); }
div.sidebar .list-group-item-selected .badge { background: #fff; color: var(--sea-sidebar-active); }

.popover { border-radius: var(--sea-radius-md); border-color: var(--sea-border); box-shadow: var(--sea-shadow-md); font-family: var(--sea-font); font-size: 0.92rem; }
.popover-title { background: var(--sea-surface-alt); border-bottom: 1px solid var(--sea-border); font-weight: 650; }
.tooltip-inner { background: var(--sea-ink-2); border-radius: var(--sea-radius-sm); padding: 8px 13px; font-size: 0.84rem; }

.markdown-content table { background: var(--sea-surface); border: 1px solid var(--sea-border); }
.markdown-editor-status { font-size: 0.85rem; color: var(--sea-text-muted); }

.center-msg {
    background: var(--sea-surface);
    border: 1px solid var(--sea-border);
    border-radius: var(--sea-radius-lg);
    box-shadow: var(--sea-shadow-md);
    padding: 42px 34px;
    max-width: 640px;
    margin: 40px auto;
    text-align: center;
}

.panel-actions .list-group .list-group-item { border-radius: var(--sea-radius-sm); margin-bottom: 4px; }

/* ============================================================
   Dashboard — WordPress admin layout (theme-purple accents)
   The client dashboard is detected by its unique `.tiles`
   at-a-glance block, so these rules DO NOT depend on any body
   class. WP admin pattern: ONE left sidebar (dark purple, light
   fonts), light-gray page behind, flat white widget cards.

   1) One left sidebar across the whole client area (right rail
      removed) — WordPress admin style.
   2) WordPress-flat content treatment for the dashboard.
   ============================================================ */

/* 1) Single left sidebar across the client area (WP admin pattern).
      The secondary (right) rail is hidden everywhere; rows that
      carried it collapse so content spans the full width. */
#main-body .sidebar-secondary { display: none !important; }
#main-body > .container > .row:has(> .sidebar-secondary) {
    grid-template-columns: var(--sea-sidebar-width) minmax(0, 1fr);
}
#main-body > .container > .row:has(> .main-content:first-child ~ .sidebar-secondary) {
    grid-template-columns: minmax(0, 1fr);
}
#main-body > .container > .row:has(> .main-content:first-child ~ .sidebar-secondary) .main-content {
    grid-column: 1 / 3;
}

/* 2) WP light-gray canvas behind the widgets */
body.clientareahome #main-body .main-content,
#main-body .row:has(.tiles) .main-content {
    background: #f0f0f1 !important;
}

/* WP flat page header (replaces the lavender gradient banner) */
body.clientareahome #main-body .header-lined,
#main-body .row:has(.tiles) .header-lined {
    background: #fff !important;
    border: 1px solid #c3c4c7 !important;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    padding: 16px 18px !important;
    margin-bottom: 20px !important;
}
body.clientareahome #main-body .header-lined::after,
#main-body .row:has(.tiles) .header-lined::after { display: none; }
body.clientareahome #main-body .header-lined h1,
#main-body .row:has(.tiles) .header-lined h1 {
    font-size: 23px !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
    letter-spacing: 0;
    margin: 0 0 2px !important;
}
body.clientareahome #main-body .header-lined h1 small,
#main-body .row:has(.tiles) .header-lined h1 small { font-size: 13px; color: #646970; }
body.clientareahome #main-body .header-lined .breadcrumb li,
body.clientareahome #main-body .header-lined .breadcrumb li a,
body.clientareahome #main-body .header-lined .breadcrumb li.active,
#main-body .row:has(.tiles) .header-lined .breadcrumb li,
#main-body .row:has(.tiles) .header-lined .breadcrumb li a,
#main-body .row:has(.tiles) .header-lined .breadcrumb li.active { color: #646970; }
body.clientareahome #main-body .header-lined .breadcrumb li a:hover,
#main-body .row:has(.tiles) .header-lined .breadcrumb li a:hover { color: var(--sea-primary); }
body.clientareahome #main-body .header-lined .breadcrumb > li + li::before,
#main-body .row:has(.tiles) .header-lined .breadcrumb > li + li::before { color: #a7aaad; }

/* Hero wallet banner keeps its gradient but sits flat on the gray page */
body.clientareahome .sea-wallet-banner,
#main-body .row:has(.tiles) .sea-wallet-banner {
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* At-a-glance stat cards → WP postboxes */
body.clientareahome .tiles,
#main-body .row:has(.tiles) .tiles { gap: 16px; }
body.clientareahome #main-body .tiles .tile,
#main-body .row:has(.tiles) .tiles .tile {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    padding: 20px 20px 22px;
    transition: border-color var(--sea-speed) var(--sea-ease), box-shadow var(--sea-speed) var(--sea-ease);
}
body.clientareahome #main-body .tiles .tile:hover,
#main-body .row:has(.tiles) .tiles .tile:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
    border-color: #8c8f94;
    background: #fff;
}
body.clientareahome #main-body .tiles .tile .icon,
#main-body .row:has(.tiles) .tiles .tile .icon {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.1rem;
}
body.clientareahome #main-body .tiles .tile .stat,
#main-body .row:has(.tiles) .tiles .tile .stat { font-size: 1.9rem; color: #1d2327; }
body.clientareahome #main-body .tiles .tile .title,
#main-body .row:has(.tiles) .tiles .tile .title { color: #646970; }

/* WP-style KB search */
body.clientareahome .home-kb-search,
#main-body .row:has(.tiles) .home-kb-search { margin-bottom: 22px; }
body.clientareahome #main-body .home-kb-search .form-control,
#main-body .row:has(.tiles) .home-kb-search .form-control {
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    color: #3c434a;
    font-size: 13px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
body.clientareahome #main-body .home-kb-search .form-control:focus,
#main-body .row:has(.tiles) .home-kb-search .form-control:focus {
    border-color: var(--sea-primary);
    box-shadow: 0 0 0 1px var(--sea-primary);
}

/* Widgets → WP postboxes */
body.clientareahome .client-home-panels .panel,
#main-body .row:has(.tiles) .client-home-panels .panel {
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    background: #fff;
    margin-bottom: 22px;
    overflow: hidden;
}
body.clientareahome .client-home-panels .panel::before,
#main-body .row:has(.tiles) .client-home-panels .panel::before { display: none; }
body.clientareahome .client-home-panels .panel > .panel-heading,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading {
    background: #fff !important;
    color: #1d2327 !important;
    border-bottom: 1px solid #f0f0f1;
    padding: 11px 14px !important;
    border-radius: 8px 8px 0 0;
}
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
}
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title i,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title i {
    color: var(--sea-primary);
}
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title .btn,
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title .btn:hover,
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title .btn:focus,
body.clientareahome .client-home-panels .panel > .panel-heading .panel-title .btn:active,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title .btn,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title .btn:hover,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title .btn:focus,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .panel-title .btn:active {
    color: #fff !important;
    text-shadow: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 26px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 3px;
}
body.clientareahome .client-home-panels .panel > .panel-body,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-body {
    padding: 12px 14px;
    font-size: 13px;
    color: #3c434a;
}
body.clientareahome .client-home-panels .panel small,
#main-body .row:has(.tiles) .client-home-panels .panel small { color: #646970 !important; }

/* Widget rows */
body.clientareahome .client-home-panels .panel > .list-group,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group {
    border-top: 1px solid #f0f0f1;
    max-height: none;
}
body.clientareahome .client-home-panels .panel > .list-group .list-group-item,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item {
    border: 0;
    border-bottom: 1px solid #f0f0f1;
    border-radius: 0;
    color: #3c434a;
    font-size: 13px;
    padding: 9px 14px !important;
    background: #fff !important;
}
body.clientareahome .client-home-panels .panel > .list-group .list-group-item:last-child,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item:last-child { border-bottom: 0; }
body.clientareahome .client-home-panels .panel > .list-group .list-group-item:hover,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item:hover { background: var(--sea-primary-soft) !important; }
body.clientareahome .client-home-panels .panel > .list-group .list-group-item.active,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item.active {
    background: var(--sea-primary-soft) !important;
    border-left: 3px solid var(--sea-primary);
    color: #1d2327;
}
body.clientareahome .client-home-panels .panel > .list-group .list-group-item.active *,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item.active * { color: #1d2327 !important; }
body.clientareahome .client-home-panels .panel > .list-group .list-group-item.active .badge,
body.clientareahome .client-home-panels .panel > .list-group .list-group-item .badge,
body.clientareahome .client-home-panels .panel > .panel-heading .badge,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item.active .badge,
#main-body .row:has(.tiles) .client-home-panels .panel > .list-group .list-group-item .badge,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-heading .badge {
    background: #dcdcde;
    color: #50575e;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    line-height: 1.5;
}

/* Widget footer */
body.clientareahome .client-home-panels .panel > .panel-footer,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-footer {
    border-top: 1px solid #f0f0f1;
    border-radius: 0 0 8px 8px;
    background: #fff;
    color: #646970;
    font-size: 12px;
    padding: 10px 0;
}
body.clientareahome .client-home-panels .panel > .panel-footer a,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-footer a { color: var(--sea-primary); }
body.clientareahome .client-home-panels .panel > .panel-footer a:hover,
#main-body .row:has(.tiles) .client-home-panels .panel > .panel-footer a:hover { color: var(--sea-primary-hover); }

/* Mobile tweaks for the WP look */
@media (max-width: 767px) {
    body.clientareahome #main-body .header-lined,
    #main-body .row:has(.tiles) .header-lined { padding: 13px 14px !important; }
    body.clientareahome #main-body .header-lined h1,
    #main-body .row:has(.tiles) .header-lined h1 { font-size: 19px !important; }
    body.clientareahome #main-body .tiles,
    #main-body .row:has(.tiles) .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 414px) {
    body.clientareahome #main-body .tiles,
    #main-body .row:has(.tiles) .tiles { grid-template-columns: repeat(1, 1fr); }
}