@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #0A192F;
    --primary-soft: #13294a;
    --accent: #F59E0B;
    --bg: #F6F8FC;
    --card: #FFFFFF;
    --text: #111827;
    --muted: #64748B;
    --border: rgba(15, 23, 42, .10);
    --danger: #DC2626;
    --success: #16A34A;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.dolph-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 285px 1fr;
}

.dolph-sidebar {
    background: linear-gradient(180deg, var(--primary), #071120);
    color: #FFFFFF;
    padding: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--accent);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 24px;
    box-shadow: 0 14px 28px rgba(245, 158, 11, .25);
}

.brand-mark.big {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    margin: 0 auto 18px;
    font-size: 38px;
}

.brand-block strong,
.brand-block span {
    display: block;
}

.brand-block span {
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

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

.main-nav a {
    text-decoration: none;
    color: rgba(255,255,255,.78);
    padding: 13px 14px;
    border-radius: 16px;
    transition: .2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #FFFFFF;
    background: rgba(255,255,255,.10);
}

.dolph-main {
    padding: 24px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 11px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 800;
}

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
}

.btn-light {
    background: #FFFFFF;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn.full {
    width: 100%;
}

.alert {
    padding: 13px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: #FFFFFF;
}

.alert.success {
    border-color: rgba(22, 163, 74, .20);
    color: #166534;
    background: #F0FDF4;
}

.alert.danger {
    border-color: rgba(220, 38, 38, .20);
    color: #991B1B;
    background: #FEF2F2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card,
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.metric-card {
    padding: 20px;
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
}

.metric-card strong {
    font-size: 34px;
    font-weight: 900;
    color: var(--primary);
}

.panel {
    padding: 20px;
    margin-bottom: 20px;
}

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

.panel-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.two-column,
.three-column {
    display: grid;
    gap: 20px;
}

.two-column {
    grid-template-columns: 1.1fr .9fr;
}

.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

code,
.code-box {
    direction: ltr;
    text-align: left;
    font-family: Consolas, Monaco, monospace;
}

.code-box {
    white-space: pre-wrap;
    background: #0F172A;
    color: #E2E8F0;
    padding: 18px;
    border-radius: 18px;
    overflow-x: auto;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #E2E8F0;
    color: #334155;
}

.status.active,
.status.completed,
.status.license_ok {
    background: #DCFCE7;
    color: #166534;
}

.status.paused,
.status.disabled,
.status.running {
    background: #FEF3C7;
    color: #92400E;
}

.status.expired,
.status.failed,
.status.danger {
    background: #FEE2E2;
    color: #991B1B;
}

.actions,
.inline-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    border: 0;
    border-radius: 12px;
    padding: 8px 11px;
    background: #F1F5F9;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
}

.icon-btn.danger {
    color: var(--danger);
}

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

.grid-form label,
.form-stack label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

.grid-form .wide,
.form-actions.wide {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 13px;
    background: #FFFFFF;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(10, 25, 47, .45);
    box-shadow: 0 0 0 4px rgba(10, 25, 47, .08);
}

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

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.event-list,
.mini-list {
    display: grid;
    gap: 10px;
}

.event-item,
.mini-list > div {
    padding: 13px;
    border-radius: 16px;
    background: #F8FAFC;
    display: grid;
    gap: 4px;
}

.event-item span,
.event-item small,
.mini-list span {
    color: var(--muted);
    font-size: 13px;
}

.brand-preview {
    min-height: 180px;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--preview-primary), #111827);
    color: #FFFFFF;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.brand-preview::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--preview-accent);
    border-radius: 50%;
    top: -60px;
    left: -30px;
    opacity: .9;
}

.brand-preview > * {
    position: relative;
}

.error-line {
    color: var(--danger);
    background: #FEF2F2;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 20%, rgba(245,158,11,.22), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(10,25,47,.20), transparent 34%),
        #F6F8FC;
}

.login-card {
    width: min(440px, 100%);
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 34px;
    box-shadow: 0 28px 80px rgba(15,23,42,.14);
    text-align: center;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 900;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

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

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .two-column,
    .three-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .dolph-shell {
        grid-template-columns: 1fr;
    }

    .dolph-sidebar {
        position: static;
        height: auto;
        border-radius: 0 0 28px 28px;
    }

    .main-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .main-nav a {
        white-space: nowrap;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .inline-form {
        grid-template-columns: 1fr;
    }

    .dolph-main {
        padding: 16px;
    }
}


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

.action-card {
    text-decoration: none;
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.action-card strong {
    color: var(--primary);
    font-size: 17px;
}

.action-card span {
    color: var(--muted);
    line-height: 1.8;
}

.status.new {
    color: #1D4ED8;
    background: #DBEAFE;
}

.status.contacted {
    color: #92400E;
    background: #FEF3C7;
}

.status.confirmed {
    color: #166534;
    background: #DCFCE7;
}

.status.cancelled {
    color: #991B1B;
    background: #FEE2E2;
}

.note-line {
    color: var(--muted);
    background: #F8FAFC;
}

.compact-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 860px) {
    .action-grid {
        grid-template-columns: 1fr;
    }
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #0A192F, #14345D);
    color: #FFFFFF;
}

.hero-panel h2 {
    margin: 6px 0;
    font-size: 28px;
}

.hero-panel p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, .78);
    line-height: 1.9;
}

.eyebrow {
    display: inline-flex;
    color: #F59E0B;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 12px;
}

.hero-badge {
    flex: 0 0 auto;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .12);
    color: #FBBF24;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, .16);
}

.status.reviewed,
.status.approved {
    color: #075985;
    background: #E0F2FE;
}

.status.resolved,
.status.applied {
    color: #166534;
    background: #DCFCE7;
}

.status.ignored,
.status.rejected,
.icon-btn.danger {
    color: #991B1B;
    background: #FEE2E2;
}

.status.pending {
    color: #92400E;
    background: #FEF3C7;
}

@media (max-width: 860px) {
    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-form {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* v4 module system */
.module-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.module-check-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04);
}

.module-check-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.module-check-card strong {
    color: var(--primary);
}

.module-check-card span {
    color: var(--muted);
    line-height: 1.7;
    font-size: 13px;
}

.checkline {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 15px;
    padding: 12px;
}

.checkline input {
    width: auto !important;
}

.dolph-preview-card {
    max-width: 320px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.dolph-preview-card .preview-image {
    height: 140px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.dolph-preview-card strong,
.dolph-preview-card p,
.dolph-preview-card button {
    margin: 12px;
}

.dolph-preview-card strong {
    display: block;
    color: var(--primary);
}

.dolph-preview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.dolph-preview-card button {
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.note-line {
    background: #f8fafc;
    color: var(--muted);
    line-height: 1.8;
}

.form-grid.one-col,
.grid-form.one-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.assistant-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.assistant-result-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 16px;
    background: #F8FAFC;
    display: grid;
    gap: 8px;
}

.assistant-result-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.assistant-result-card strong {
    font-size: 17px;
}

.assistant-result-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.list-row.compact {
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

@media (max-width: 980px) {
    .assistant-card-grid {
        grid-template-columns: 1fr;
    }
}

.dolph-sidebar {
    overflow-y: auto;
}

/* v7 production responsive layer */
.stats-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filters-row input,
.filters-row select,
.grid-form textarea,
.grid-form input,
.grid-form select {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 13px;
    background: #fff;
    color: var(--text);
    min-height: 44px;
}

.filters-row input {
    min-width: min(420px, 100%);
    flex: 1;
}

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

.info-grid > div {
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 18px;
    padding: 13px;
}

.info-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.info-grid strong {
    color: var(--primary);
    word-break: break-word;
}

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

.health-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    padding: 16px;
    display: grid;
    gap: 8px;
}

.health-card span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 800;
}

.health-card strong {
    color: var(--primary);
    font-size: 22px;
}

.health-card.ok {
    border-color: rgba(22, 163, 74, .25);
}

.health-card.warning {
    border-color: rgba(245, 158, 11, .35);
}

.health-card.danger {
    border-color: rgba(220, 38, 38, .30);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    background: #f1f5f9;
    color: var(--primary);
}

.badge.success,
.badge.ok {
    color: #166534;
    background: #dcfce7;
}

.badge.warning {
    color: #92400e;
    background: #fef3c7;
}

.badge.danger {
    color: #991b1b;
    background: #fee2e2;
}

.log-viewer {
    background: #08111f;
    color: #dbeafe;
    border-radius: 20px;
    padding: 16px;
    overflow: auto;
    max-height: 560px;
    line-height: 1.65;
    font-size: 13px;
}

.wrap-text {
    word-break: break-word;
    max-width: 420px;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .two-column,
    .three-column,
    .health-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .dolph-shell {
        display: block;
    }

    .dolph-sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        height: auto;
        max-height: 48vh;
        border-bottom-left-radius: 26px;
        border-bottom-right-radius: 26px;
        padding: 16px;
    }

    .brand-block {
        margin-bottom: 14px;
    }

    .main-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 6px;
    }

    .main-nav a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .dolph-main {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .stats-grid,
    .stats-grid.three,
    .assistant-card-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .metric-card strong {
        font-size: 28px;
    }

    .panel,
    .metric-card {
        border-radius: 20px;
    }
}

@media (max-width: 560px) {
    .filters-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filters-row input,
    .filters-row select,
    .filters-row .btn {
        width: 100%;
        min-width: 0;
    }

    table {
        min-width: 760px;
    }
}
.two-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
@media (max-width: 1180px) { .two-columns { grid-template-columns: 1fr; } }

/* v8 lead management refinements */
th,
td,
.form-stack {
    text-align: left;
}

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

.badge.hot {
    background: #FEE2E2;
    color: #991B1B;
}

.badge.warm {
    background: #FEF3C7;
    color: #92400E;
}

.badge.cold {
    background: #DBEAFE;
    color: #1E40AF;
}

.lead-score-ring {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: conic-gradient(var(--accent) calc(var(--score, 0) * 1%), #E2E8F0 0);
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--primary);
}

@media (max-width: 1180px) {
    .stats-grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .stats-grid.four {
        grid-template-columns: 1fr;
    }
}

/* v9 knowledge studio */
.status.high {
    color: #166534;
    background: #DCFCE7;
}

.status.medium {
    color: #92400E;
    background: #FEF3C7;
}

.status.low {
    color: #991B1B;
    background: #FEE2E2;
}

.knowledge-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 12px;
    font-weight: 900;
}

/* v10 commercial SaaS operations */
.billing-plan-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    padding: 18px;
    display: grid;
    gap: 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .05);
}

.billing-plan-card .price {
    color: var(--primary);
    font-size: 28px;
    font-weight: 900;
}

.payment-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.status.paid,
.status.active,
.status.approved {
    background: #DCFCE7;
    color: #166534;
}

.status.unpaid,
.status.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status.overdue,
.status.failed,
.status.rejected,
.status.expired {
    background: #FEE2E2;
    color: #991B1B;
}

@media (max-width: 860px) {
    .payment-status-line {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* v11 enterprise QA and production polish */
.qa-hero {
    position: relative;
    overflow: hidden;
}

.qa-hero::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(245, 158, 11, .18);
    right: -80px;
    top: -110px;
}

.readiness-meter {
    --readiness: 0;
    width: 136px;
    height: 136px;
    border-radius: 999px;
    background: conic-gradient(#F59E0B calc(var(--readiness) * 1%), rgba(255,255,255,.18) 0);
    display: grid;
    place-items: center;
    color: #fff;
    position: relative;
    isolation: isolate;
    flex: 0 0 auto;
}

.readiness-meter::before {
    content: '';
    position: absolute;
    inset: 13px;
    border-radius: inherit;
    background: #0A192F;
    z-index: -1;
}

.readiness-meter strong,
.readiness-meter span {
    display: block;
    text-align: center;
}

.readiness-meter strong {
    font-size: 28px;
    font-weight: 950;
}

.readiness-meter span {
    margin-top: -18px;
    color: rgba(255,255,255,.7);
    font-size: 12px;
}

.qa-action-grid {
    margin-bottom: 20px;
}

.qa-grid,
.role-matrix,
.checklist-grid,
.doc-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.qa-card,
.role-card,
.checklist-grid > div,
.doc-card,
.qa-area-row {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.qa-card span,
.doc-card code,
.qa-area-row span {
    color: var(--muted);
    font-size: 12px;
}

.qa-card strong,
.role-card strong,
.doc-card strong,
.qa-area-row strong {
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
}

.qa-card p,
.role-card p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

.qa-check-list {
    display: grid;
    gap: 10px;
}

.qa-area-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: none;
}

.status.pass,
.status.success,
.status.done {
    background: #DCFCE7;
    color: #166534;
}

.status.warning,
.status.pending,
.status.skipped {
    background: #FEF3C7;
    color: #92400E;
}

.status.fail {
    background: #FEE2E2;
    color: #991B1B;
}

.doc-card {
    display: grid;
    gap: 8px;
}

.doc-card code {
    direction: ltr;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px;
    overflow-x: auto;
}

@media (max-width: 1180px) {
    .qa-grid,
    .role-matrix,
    .checklist-grid,
    .doc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .qa-grid,
    .role-matrix,
    .checklist-grid,
    .doc-list {
        grid-template-columns: 1fr;
    }

    .readiness-meter {
        width: 118px;
        height: 118px;
    }

    .mobile-card-table,
    .mobile-card-table thead,
    .mobile-card-table tbody,
    .mobile-card-table th,
    .mobile-card-table td,
    .mobile-card-table tr {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 20px;
        margin-bottom: 12px;
        padding: 10px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    }

    .mobile-card-table td {
        border: 0;
        padding: 10px 8px;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .05em;
        font-weight: 900;
        margin-bottom: 4px;
    }
}

.span-2 { grid-column: span 2; }
@media (max-width: 860px) { .span-2 { grid-column: span 1; } }

/* v13 Dolph Groups premium top navigation and modal polish */
:root {
    --primary: #1f5fd7;
    --primary-deep: #173c79;
    --primary-soft: #edf5ff;
    --accent: #22c7df;
    --amber: #f6b23f;
    --bg: #eef4fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: rgba(30, 64, 175, .12);
    --shadow: 0 22px 55px rgba(15, 23, 42, .08);
    --soft-shadow: 0 14px 34px rgba(37, 99, 235, .10);
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(34, 199, 223, .18), transparent 32rem),
        radial-gradient(circle at top right, rgba(31, 95, 215, .14), transparent 34rem),
        var(--bg);
    overflow-x: hidden;
}

body::-webkit-scrollbar,
.dolph-sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.nav-drop-menu::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

body::-webkit-scrollbar-thumb,
.dolph-sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.nav-drop-menu::-webkit-scrollbar-thumb {
    background: rgba(30, 64, 175, .28);
    border-radius: 999px;
}

.dolph-shell {
    display: block;
    min-height: 100vh;
}

.dolph-top-navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: auto;
    min-height: 74px;
    width: 100%;
    padding: 0;
    color: #ffffff;
    overflow: visible;
    background: linear-gradient(100deg, #175ad5 0%, #088de4 52%, #22c7df 100%);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 18px 34px rgba(37, 99, 235, .20);
}

.topnav-inner {
    width: min(1480px, calc(100% - 28px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.dolph-top-navigation .brand-block {
    margin: 0;
    flex: 0 0 auto;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(14px);
}

.dolph-top-navigation .brand-mark {
    background: #ffffff;
    color: #1557cf;
    box-shadow: none;
}

.dolph-top-navigation .brand-block span {
    color: rgba(255, 255, 255, .78);
}

.dolph-top-navigation .main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding: 12px 2px;
}

.dolph-top-navigation .main-nav > a,
.dolph-top-navigation .nav-drop > summary {
    text-decoration: none;
    color: rgba(255, 255, 255, .92);
    min-height: 44px;
    padding: 0 15px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    transition: .2s ease;
}

.dolph-top-navigation .nav-drop > summary::-webkit-details-marker {
    display: none;
}

.dolph-top-navigation .nav-drop > summary::after {
    content: '⌄';
    font-size: 13px;
    margin-left: 7px;
    opacity: .8;
}

.dolph-top-navigation .main-nav > a:hover,
.dolph-top-navigation .main-nav > a.active,
.dolph-top-navigation .nav-drop:hover > summary,
.dolph-top-navigation .nav-drop.active > summary,
.dolph-top-navigation .nav-drop[open] > summary {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
}

.nav-drop {
    position: relative;
    flex: 0 0 auto;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 20px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 24px 65px rgba(15, 23, 42, .18);
    border: 1px solid rgba(15, 23, 42, .08);
}

.nav-drop-menu a {
    display: flex;
    text-decoration: none;
    padding: 12px 13px;
    border-radius: 14px;
    color: #172554;
    font-weight: 800;
}

.nav-drop-menu a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.nav-user-actions {
    margin-left: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, .16);
    font-weight: 900;
}

.dolph-main {
    width: min(1480px, calc(100% - 34px));
    margin: 0 auto;
    padding: 24px 0 38px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    margin-bottom: 22px;
    padding: 34px 36px;
    border-radius: 26px;
    color: #ffffff;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, .14), transparent 15rem),
        radial-gradient(circle at 100% 100%, rgba(0, 0, 0, .12), transparent 22rem),
        linear-gradient(135deg, #1f4f91 0%, #193f78 60%, #102d59 100%);
    box-shadow: 0 24px 55px rgba(15, 23, 42, .18);
}

.page-hero::before,
.page-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.page-hero::before {
    width: 190px;
    height: 190px;
    left: -70px;
    top: -50px;
}

.page-hero::after {
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -130px;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero .muted,
.page-hero .hero-subtitle {
    color: rgba(255, 255, 255, .78);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -.03em;
}

.hero-subtitle {
    margin: 8px 0 0;
    max-width: 760px;
    line-height: 1.7;
    font-weight: 700;
}

.hero-icon {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    font-size: 30px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

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

.metric-card,
.panel,
.action-card,
.quick-card,
.dolph-preview-card,
.assistant-result-card {
    border-radius: 24px;
    border: 1px solid rgba(30, 64, 175, .10);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--soft-shadow);
}

.metric-card {
    min-height: 132px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    width: 78px;
    height: 78px;
    right: -22px;
    top: -20px;
    border-radius: 999px;
    background: rgba(34, 199, 223, .12);
}

.metric-card span {
    color: #64748b;
    font-weight: 800;
}

.metric-card strong {
    color: #06152c;
    font-size: clamp(30px, 3vw, 42px);
    letter-spacing: -.04em;
}

.panel {
    padding: 24px;
}

.panel-head {
    align-items: center;
    margin-bottom: 18px;
}

.panel-head h2 {
    font-size: 22px;
    letter-spacing: -.02em;
}

.quick-grid,
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 22px;
}

.quick-card,
.action-card {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: .2s ease;
}

.quick-card:hover,
.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(37, 99, 235, .15);
    border-color: rgba(37, 99, 235, .25);
}

.quick-card strong,
.action-card strong {
    color: #123e7c;
    font-size: 17px;
}

.quick-card span,
.action-card span {
    color: var(--muted);
    line-height: 1.65;
    font-size: 13px;
}

a.quick-card,
a.action-card {
    text-decoration: none !important;
}

.table-wrap {
    border-radius: 20px;
    border: 1px solid rgba(30, 64, 175, .08);
    background: #ffffff;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f7fbff;
    color: #475569;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}

td {
    background: #ffffff;
}

tr:hover td {
    background: #fbfdff;
}

.btn,
.icon-btn {
    border-radius: 15px;
    min-height: 42px;
    transition: .2s ease;
}

.btn-primary,
.icon-btn.primary {
    background: linear-gradient(135deg, #1f5fd7, #1fb9dc);
    color: #ffffff;
}

.btn-light,
.icon-btn {
    background: #ffffff;
    border: 1px solid rgba(30, 64, 175, .13);
    color: #173c79;
}

.btn:hover,
.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, .08);
}

.badge,
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #e0f2fe;
    color: #075985;
}

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

.form-grid label,
.grid-form label,
.form-stack label {
    display: grid;
    gap: 8px;
    color: #52627a;
    font-size: 13px;
    font-weight: 900;
}

.form-grid .wide,
.grid-form .wide {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    border-radius: 16px;
    border: 1px solid rgba(30, 64, 175, .14);
    background: #fbfdff;
    min-height: 46px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(31, 95, 215, .55);
    box-shadow: 0 0 0 5px rgba(31, 95, 215, .10);
}

.code-box {
    border-radius: 18px;
    background: #0b1224;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.alert.dolph-flash {
    display: none;
}

.dolph-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dolph-modal.is-open {
    display: flex;
}

.dolph-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 35, .56);
    backdrop-filter: blur(8px);
}

.dolph-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(86vh, 920px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 30px 95px rgba(15, 23, 42, .30);
    border: 1px solid rgba(255, 255, 255, .45);
}

.dolph-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #1f5fd7, #1fb9dc);
}

.dolph-modal-head h3 {
    margin: 0;
    font-size: 21px;
    font-weight: 900;
}

.dolph-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .20);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.dolph-modal-body {
    padding: 24px;
    overflow: auto;
}

.dolph-modal-body form {
    margin: 0;
}

.panel.is-modalized .modalized-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px dashed rgba(31, 95, 215, .22);
}

.panel.is-modalized .modalized-placeholder p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.swal2-popup {
    border-radius: 22px !important;
    font-family: Inter, Arial, sans-serif !important;
}

.swal2-toast {
    border-radius: 18px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16) !important;
}

.login-body {
    background:
        radial-gradient(circle at 15% 20%, rgba(34,199,223,.22), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(31,95,215,.22), transparent 34%),
        #edf5ff;
}

@media (max-width: 1280px) {
    .stats-grid,
    .quick-grid,
    .action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .topnav-inner {
        align-items: stretch;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .dolph-top-navigation .main-nav {
        order: 3;
        width: 100%;
    }
}

@media (max-width: 860px) {
    .dolph-top-navigation {
        border-radius: 0 0 22px 22px;
    }

    .topnav-inner {
        width: min(100% - 18px, 1480px);
        gap: 8px;
    }

    .dolph-top-navigation .brand-block {
        flex: 1 1 auto;
    }

    .nav-user-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dolph-main {
        width: min(100% - 20px, 1480px);
        padding-top: 18px;
    }

    .page-hero {
        min-height: auto;
        padding: 24px;
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .quick-grid,
    .action-grid,
    .form-grid,
    .grid-form,
    .two-column,
    .three-column {
        grid-template-columns: 1fr !important;
    }

    table {
        min-width: 0;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap th,
    .table-wrap td,
    .table-wrap tr {
        display: block;
        width: 100%;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tr {
        margin: 12px;
        border: 1px solid rgba(30, 64, 175, .10);
        border-radius: 18px;
        overflow: hidden;
        background: #ffffff;
    }

    .table-wrap td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        border-bottom: 1px solid rgba(15, 23, 42, .06);
        padding: 12px 14px;
        text-align: right;
    }

    .table-wrap td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 900;
        text-align: left;
    }

    .table-wrap td.actions,
    .table-wrap td:last-child {
        display: block;
        text-align: left;
    }

    .actions,
    .inline-action,
    .form-actions {
        flex-wrap: wrap;
    }

    .dolph-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .dolph-modal-dialog {
        max-height: 92vh;
        border-radius: 24px;
    }
}

/* ==========================================================
   Dolph UI Refresh v13 - premium top navigation, mobile menu,
   and professional login screens.
   ========================================================== */
:root {
    --dolph-blue: #1f63e9;
    --dolph-blue-2: #0ea5e9;
    --dolph-cyan: #22d3ee;
    --dolph-navy: #112a55;
    --dolph-surface: rgba(255, 255, 255, .88);
    --dolph-soft-border: rgba(37, 99, 235, .16);
    --dolph-ring: rgba(37, 99, 235, .14);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.dolph-admin,
body.dolph-client {
    background:
        radial-gradient(circle at 4% 6%, rgba(34, 211, 238, .18), transparent 320px),
        radial-gradient(circle at 94% 0%, rgba(37, 99, 235, .16), transparent 380px),
        linear-gradient(180deg, #eef7ff 0%, #f7fbff 42%, #f8fafc 100%);
}

.dolph-shell {
    display: block !important;
    min-height: 100vh;
}

.dolph-top-navigation {
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    min-height: 78px;
    padding: 8px 0;
    color: #ffffff;
    overflow: visible;
    background: linear-gradient(115deg, #1f63e9 0%, #128de4 48%, #22c8dd 100%);
    border-radius: 0 0 28px 28px;
    box-shadow: 0 18px 34px rgba(37, 99, 235, .18);
}

.topnav-inner {
    width: min(1540px, calc(100% - 28px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.dolph-top-navigation .brand-block {
    margin: 0;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    gap: 10px;
    padding: 8px 14px 8px 9px;
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
    backdrop-filter: blur(14px);
}

.dolph-top-navigation .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #ffffff;
    color: #1e5bd8;
    font-size: 22px;
    box-shadow: none;
}

.brand-copy strong {
    display: block;
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.brand-copy span,
.dolph-top-navigation .brand-block span {
    display: none !important;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 17px;
    background: rgba(255, 255, 255, .95);
    color: #11315f;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
    position: relative;
}

.nav-toggle span {
    position: absolute;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #11315f;
    transition: transform .22s ease, opacity .22s ease, top .22s ease;
}

.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 24px; }
.nav-toggle span:nth-child(3) { top: 31px; }
.nav-toggle em { display: none; }

body.nav-open .nav-toggle span:nth-child(1) {
    top: 24px;
    transform: rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
    top: 24px;
    transform: rotate(-45deg);
}

.dolph-top-navigation .main-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    overflow: visible !important;
    padding: 0 4px;
}

.dolph-top-navigation .main-nav > a,
.dolph-top-navigation .nav-drop > summary {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 15px;
    color: rgba(255, 255, 255, .95);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -.01em;
    cursor: pointer;
    list-style: none;
    outline: 0;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dolph-top-navigation .nav-drop > summary::-webkit-details-marker {
    display: none;
}

.dolph-top-navigation .nav-drop > summary::after {
    content: '⌄';
    font-size: 12px;
    line-height: 1;
    margin-left: 6px;
    opacity: .75;
}

.dolph-top-navigation .main-nav > a:hover,
.dolph-top-navigation .main-nav > a.active,
.dolph-top-navigation .nav-drop:hover > summary,
.dolph-top-navigation .nav-drop.active > summary,
.dolph-top-navigation .nav-drop[open] > summary {
    color: #0f2550;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
}

.nav-drop {
    position: relative;
    flex: 0 0 auto;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 235px;
    max-height: min(420px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 10px;
    border-radius: 21px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 24px 65px rgba(15, 23, 42, .18);
    border: 1px solid rgba(15, 23, 42, .08);
    z-index: 1300;
}

.nav-drop-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    padding: 12px 13px;
    border-radius: 14px;
    color: #172554;
    font-weight: 850;
    font-size: 14px;
}

.nav-drop-menu a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.account-menu {
    margin-left: 2px;
}

.account-menu > summary {
    min-width: 0;
    max-width: 230px;
    gap: 8px;
    padding: 0 12px !important;
    background: rgba(255, 255, 255, .16);
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .20);
    color: #ffffff;
}

.account-name {
    display: inline-block;
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-dropdown {
    left: auto;
    right: 0;
    min-width: 210px;
}

.dolph-main {
    width: min(1480px, calc(100% - 34px));
    margin: 0 auto;
    padding: 24px 0 42px;
}

.page-hero {
    min-height: 178px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, .16), transparent 15rem),
        radial-gradient(circle at 100% 100%, rgba(255, 255, 255, .10), transparent 20rem),
        linear-gradient(135deg, #244f8b 0%, #1d497f 52%, #153864 100%);
}

/* Professional login screens */
.login-body.premium-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 10% 82%, rgba(20, 184, 166, .30), transparent 310px),
        radial-gradient(circle at 90% 15%, rgba(147, 197, 253, .48), transparent 330px),
        linear-gradient(135deg, #60718d 0%, #dceeff 54%, #eef8ff 100%);
}

.login-shell {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 28px;
    align-items: stretch;
}

.login-visual,
.login-card.premium-card {
    border: 1px solid rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .18);
    backdrop-filter: blur(22px);
}

.login-visual {
    min-height: 560px;
    border-radius: 36px;
    padding: 30px;
    color: #ffffff;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 10% 15%, rgba(255, 255, 255, .24), transparent 180px),
        radial-gradient(circle at 95% 85%, rgba(34, 211, 238, .34), transparent 240px),
        linear-gradient(145deg, #173b70 0%, #1e63d9 60%, #16b8d5 100%);
}

.login-visual::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    right: -100px;
    bottom: -80px;
}

.login-visual-card {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 18px;
}

.visual-icon,
.login-logo {
    width: 82px;
    height: 82px;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 950;
    background: linear-gradient(135deg, #2f6df6, #12b7d7);
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(37, 99, 235, .24);
}

.login-visual h2 {
    margin: 0;
    font-size: clamp(34px, 4vw, 54px);
    line-height: .98;
    letter-spacing: -.05em;
}

.login-visual p {
    margin: 0;
    max-width: 390px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.75;
    font-weight: 700;
}

.visual-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.visual-stats span {
    padding: 13px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 12px;
    font-weight: 800;
}

.visual-stats strong {
    display: block;
    font-size: 18px;
}

.login-card.premium-card {
    width: 100%;
    min-height: 560px;
    border-radius: 36px;
    padding: clamp(30px, 5vw, 54px);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card.premium-card .login-logo {
    margin: 0 auto 22px;
}

.login-card.premium-card h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 950;
    letter-spacing: -.055em;
    color: #101a30;
}

.login-card.premium-card p {
    margin: 12px auto 30px;
    max-width: 430px;
    color: #64748b;
    font-weight: 800;
}

.login-form {
    text-align: left;
    gap: 18px;
}

.login-form label {
    color: #1e293b;
    font-weight: 900;
}

.input-shell {
    position: relative;
    display: block;
}

.input-shell input {
    min-height: 56px;
    padding: 0 48px 0 17px;
    border-radius: 18px;
    background: rgba(248, 250, 252, .94);
    border: 1px solid rgba(148, 163, 184, .28);
    font-weight: 800;
}

.input-shell i {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-style: normal;
}

.login-submit {
    min-height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2864ea, #153fae);
    box-shadow: 0 18px 38px rgba(37, 99, 235, .22);
}

@media (max-width: 1380px) {
    .dolph-top-navigation .main-nav > a,
    .dolph-top-navigation .nav-drop > summary {
        padding: 0 9px;
        font-size: 13px;
    }

    .account-name {
        max-width: 125px;
    }
}

@media (max-width: 1120px) {
    .topnav-inner {
        min-height: 62px;
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: inline-flex;
        order: 3;
    }

    .dolph-top-navigation .brand-block {
        flex: 1 1 auto;
        max-width: calc(100% - 118px);
    }

    .account-menu {
        order: 2;
        margin-left: auto;
    }

    .account-menu > summary {
        width: 50px;
        height: 50px;
        padding: 0 !important;
        border-radius: 17px;
        justify-content: center;
    }

    .account-name,
    .account-menu > summary::after {
        display: none !important;
    }

    .account-dropdown {
        right: 0;
    }

    .dolph-top-navigation .main-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 10px);
        width: 100%;
        padding: 12px;
        border-radius: 24px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 28px 70px rgba(15, 23, 42, .20);
        border: 1px solid rgba(15, 23, 42, .08);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 7px;
        z-index: 1200;
    }

    body.nav-open .dolph-top-navigation .main-nav {
        display: flex;
    }

    .dolph-top-navigation .main-nav > a,
    .dolph-top-navigation .main-nav .nav-drop > summary {
        width: 100%;
        justify-content: space-between;
        min-height: 48px;
        color: #0f2550;
        background: #f8fbff;
        padding: 0 15px;
        border: 1px solid rgba(37, 99, 235, .09);
    }

    .dolph-top-navigation .main-nav > a.active,
    .dolph-top-navigation .nav-drop.active > summary,
    .dolph-top-navigation .nav-drop[open] > summary {
        background: linear-gradient(135deg, #eff6ff, #eefcff);
        color: #1d4ed8;
    }

    .dolph-top-navigation .main-nav .nav-drop {
        width: 100%;
    }

    .dolph-top-navigation .main-nav .nav-drop-menu {
        position: static;
        min-width: 0;
        max-height: none;
        margin-top: 7px;
        border-radius: 18px;
        box-shadow: none;
        background: #ffffff;
    }

    .dolph-main {
        width: min(100% - 22px, 1480px);
        padding-top: 22px;
    }
}

@media (max-width: 760px) {
    .dolph-top-navigation {
        border-radius: 0 0 22px 22px;
        padding: 7px 0;
    }

    .topnav-inner {
        width: min(100% - 16px, 1540px);
        gap: 7px;
    }

    .dolph-top-navigation .brand-block {
        min-height: 54px;
        padding: 7px 11px 7px 8px;
    }

    .brand-copy strong {
        font-size: 15px;
    }

    .page-hero {
        padding: 24px;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .login-visual {
        min-height: 220px;
        border-radius: 30px;
        padding: 24px;
    }

    .login-visual-card {
        justify-content: center;
    }

    .visual-stats {
        grid-template-columns: 1fr;
    }

    .login-card.premium-card {
        min-height: auto;
        border-radius: 30px;
        padding: 30px 22px;
    }
}

@media (max-width: 520px) {
    .login-body.premium-login {
        padding: 14px;
    }

    .login-visual {
        display: none;
    }

    .login-card.premium-card h1 {
        font-size: 34px;
    }

    .brand-copy strong {
        max-width: 126px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dolph-top-navigation .brand-mark,
    .account-menu > summary,
    .nav-toggle {
        width: 48px;
        height: 48px;
    }
}

/* ==========================================================
   Final Dolph Groups UI Fixes - login-only layout, hero left
   alignment, toast z-index, compact modals, readiness meter,
   and premium responsive tables.
   ========================================================== */

html, body {
    min-height: 100%;
}

/* Login pages: centered form only, tighter card padding */
.login-body.premium-login {
    display: grid !important;
    place-items: center !important;
    min-height: 100vh;
    padding: 18px;
    background:
        radial-gradient(circle at 9% 82%, rgba(20, 184, 166, .22), transparent 280px),
        radial-gradient(circle at 90% 12%, rgba(147, 197, 253, .42), transparent 320px),
        linear-gradient(135deg, #f3f8ff 0%, #eaf6ff 56%, #f8fbff 100%) !important;
}

.login-shell {
    width: min(560px, 100%) !important;
    display: block !important;
}

.login-visual {
    display: none !important;
}

.login-card.premium-card {
    width: min(520px, 100%) !important;
    min-height: auto !important;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 34px) !important;
    border-radius: 30px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .14) !important;
}

.login-card.premium-card .login-logo {
    width: 76px;
    height: 76px;
    margin-bottom: 16px !important;
}

.login-card.premium-card h1 {
    font-size: clamp(30px, 5vw, 40px) !important;
}

.login-card.premium-card p {
    margin: 8px auto 22px !important;
}

.login-form {
    gap: 14px !important;
}

.input-shell input {
    min-height: 52px !important;
}

.login-submit {
    min-height: 54px !important;
}

/* Hero must always read from the left */
.page-hero,
.topbar.page-hero {
    justify-content: flex-start !important;
    text-align: left !important;
    align-items: center;
}

.page-hero > div:not(.hero-icon),
.topbar.page-hero > div:not(.hero-icon) {
    text-align: left !important;
    margin-left: 0;
    margin-right: auto;
}

.page-hero h1,
.page-hero p,
.page-hero .muted,
.hero-subtitle {
    text-align: left !important;
}

/* SweetAlert2 must appear above sticky navigation */
.swal2-container {
    z-index: 999999 !important;
}

.dolph-fallback-toast {
    z-index: 999999 !important;
}

/* Compact modal header */
.dolph-modal-head {
    min-height: 56px !important;
    padding: 12px 18px !important;
}

.dolph-modal-head h3 {
    font-size: 18px !important;
}

.dolph-modal-close {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    font-size: 21px !important;
}

.dolph-modal-body {
    padding: 18px !important;
}

/* Readiness meter readability */
.readiness-meter {
    width: 142px !important;
    height: 142px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    color: #10223f !important;
    background: conic-gradient(#22c7df calc(var(--readiness) * 1%), rgba(226, 232, 240, .95) 0) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 16px 38px rgba(15, 23, 42, .16) !important;
}

.readiness-meter::before {
    inset: 14px !important;
    background: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(30, 64, 175, .10) !important;
}

.readiness-meter strong,
.readiness-meter span {
    position: relative;
    z-index: 2;
    margin: 0 !important;
    color: #10223f !important;
    line-height: 1.15 !important;
}

.readiness-meter strong {
    font-size: 30px !important;
}

.readiness-meter span {
    font-size: 12px !important;
    font-weight: 900 !important;
    opacity: .78;
}

/* Invoice summary content */
.invoice-summary-grid {
    display: grid;
    gap: 12px;
}

.invoice-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(30, 64, 175, .10);
    background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.invoice-summary-item span {
    color: #475569;
    font-weight: 900;
}

.invoice-summary-item strong {
    min-width: 54px;
    height: 38px;
    padding: 0 12px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #123e7c;
    background: #eaf4ff;
    font-size: 20px;
}

.invoice-summary-item.is-paid strong { color: #166534; background: #dcfce7; }
.invoice-summary-item.is-unpaid strong { color: #92400e; background: #fef3c7; }
.invoice-summary-item.is-overdue strong { color: #991b1b; background: #fee2e2; }
.invoice-summary-item.is-cancelled strong { color: #475569; background: #f1f5f9; }

/* Premium tables */
.table-wrap {
    overflow: hidden;
    border-radius: 22px !important;
    border: 1px solid rgba(37, 99, 235, .12) !important;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}

.table-wrap table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    min-width: 760px;
    padding: 10px;
}

.table-wrap thead th {
    background: transparent !important;
    border-bottom: 0 !important;
    padding: 10px 14px !important;
    color: #64748b;
}

.table-wrap tbody tr {
    box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
}

.table-wrap tbody td {
    border: 0 !important;
    background: #ffffff !important;
    padding: 15px 14px !important;
    border-top: 1px solid rgba(37, 99, 235, .08) !important;
    border-bottom: 1px solid rgba(37, 99, 235, .08) !important;
}

.table-wrap tbody td:first-child {
    border-left: 1px solid rgba(37, 99, 235, .08) !important;
    border-radius: 16px 0 0 16px;
}

.table-wrap tbody td:last-child {
    border-right: 1px solid rgba(37, 99, 235, .08) !important;
    border-radius: 0 16px 16px 0;
}

.table-wrap tbody tr:hover td {
    background: #f8fbff !important;
}

/* PWA install prompt polish */
.pwa-install-note {
    color: #64748b;
    line-height: 1.65;
    font-size: 14px;
}

@media (max-width: 860px) {
    .page-hero,
    .topbar.page-hero {
        align-items: flex-start !important;
    }

    .table-wrap {
        overflow: visible !important;
        box-shadow: none;
        border: 0 !important;
        background: transparent;
    }

    .table-wrap table {
        padding: 0 !important;
        border-spacing: 0 !important;
    }

    .table-wrap tr {
        box-shadow: 0 12px 28px rgba(15, 23, 42, .06) !important;
    }

    .table-wrap td {
        border-radius: 0 !important;
        text-align: right;
    }

    .table-wrap td:first-child {
        border-radius: 18px 18px 0 0 !important;
    }

    .table-wrap td:last-child {
        border-radius: 0 0 18px 18px !important;
    }

    .readiness-meter {
        width: 124px !important;
        height: 124px !important;
    }
}

/* v14 multilingual, RTL/LTR, premium tables, and client controls */
:root {
    --dolph-blue: #146cf0;
    --dolph-cyan: #15c6e8;
    --dolph-navy: #102a4f;
    --dolph-soft-bg: #eef6ff;
    --dolph-table-head: #f4f8ff;
    --dolph-table-line: #dbe8fb;
}

html[lang="ar"],
body.lang-ar,
body.dir-rtl,
.dir-rtl * {
    font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

html[lang="en"],
body.lang-en,
body.dir-ltr,
.dir-ltr * {
    font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

body.dir-rtl {
    direction: rtl;
    text-align: right;
}

body.dir-ltr {
    direction: ltr;
    text-align: left;
}

body.dir-rtl .page-hero,
body.dir-rtl .topbar.page-hero {
    text-align: right !important;
    align-items: flex-start !important;
}

body.dir-ltr .page-hero,
body.dir-ltr .topbar.page-hero {
    text-align: left !important;
    align-items: flex-start !important;
}

body.dir-rtl .topnav-inner,
body.dir-rtl .main-nav,
body.dir-rtl .form-actions,
body.dir-rtl .actions {
    direction: rtl;
}

body.dir-rtl .account-menu,
body.dir-rtl .language-menu {
    margin-left: 0;
    margin-right: auto;
}

.dolph-top-navigation {
    overflow: visible !important;
}

.topnav-inner {
    gap: 10px !important;
    overflow: visible !important;
}

.main-nav {
    gap: 5px !important;
    min-width: 0;
}

.main-nav > a,
.main-nav summary {
    padding: 10px 13px !important;
    white-space: nowrap;
}

.compact-drop summary {
    min-width: 58px;
    justify-content: center;
}

.language-menu .nav-drop-menu a.active,
.nav-drop-menu a.active {
    background: rgba(20, 108, 240, .10);
    color: var(--dolph-blue);
    font-weight: 800;
}

.swal2-container {
    z-index: 2147483647 !important;
}

.login-shell.minimal-login-shell {
    min-height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    padding: 22px !important;
}

.compact-login-card {
    max-width: 430px !important;
    width: min(430px, calc(100vw - 32px)) !important;
    padding: 28px !important;
    border-radius: 28px !important;
}

.compact-login-card .login-logo {
    width: 62px !important;
    height: 62px !important;
    border-radius: 20px !important;
    font-size: 26px !important;
}

.compact-login-card h1 {
    margin: 12px 0 6px !important;
    font-size: clamp(26px, 4vw, 34px) !important;
}

.compact-login-card p {
    margin-bottom: 18px !important;
}

.login-language-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.login-language-switch a {
    color: #146cf0;
    text-decoration: none;
    font-weight: 800;
    background: #eff6ff;
    padding: 7px 12px;
    border-radius: 999px;
}

.form-section-title {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(20,108,240,.12), rgba(21,198,232,.14));
    color: #103a75;
    font-size: 14px;
    font-weight: 900;
}

.form-check-line {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: flex-start;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid rgba(20,108,240,.12);
    border-radius: 18px;
    background: #f8fbff;
}

.form-check-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--dolph-blue);
}

.dolph-modal-head {
    min-height: 54px !important;
    padding: 10px 16px !important;
}

.dolph-modal-head h3 {
    font-size: 17px !important;
}

/* Premium table system */
.table-wrap,
.premium-table-wrap {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow-x: auto;
}

.table-wrap table,
.premium-data-table {
    width: 100%;
    min-width: 780px;
    border-collapse: separate !important;
    border-spacing: 0 11px !important;
    background: transparent !important;
}

.table-wrap thead th,
.premium-data-table thead th {
    background: #f2f7ff !important;
    color: #6b7c93 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    white-space: nowrap;
}

.table-wrap thead th:first-child,
.premium-data-table thead th:first-child {
    border-radius: 18px 0 0 18px !important;
}

.table-wrap thead th:last-child,
.premium-data-table thead th:last-child {
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap thead th:first-child,
body.dir-rtl .premium-data-table thead th:first-child {
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap thead th:last-child,
body.dir-rtl .premium-data-table thead th:last-child {
    border-radius: 18px 0 0 18px !important;
}

.table-wrap tbody tr,
.premium-data-table tbody tr {
    background: #fff !important;
    border-radius: 22px !important;
    box-shadow: 0 12px 26px rgba(15, 46, 90, .055) !important;
}

.table-wrap tbody td,
.premium-data-table tbody td {
    background: #fff !important;
    border: 0 !important;
    border-top: 1px solid rgba(20,108,240,.08) !important;
    border-bottom: 1px solid rgba(20,108,240,.08) !important;
    padding: 15px 16px !important;
    vertical-align: middle;
    color: #243b53;
    font-size: 13px;
}

.table-wrap tbody td:first-child,
.premium-data-table tbody td:first-child {
    border-left: 1px solid rgba(20,108,240,.08) !important;
    border-radius: 20px 0 0 20px !important;
}

.table-wrap tbody td:last-child,
.premium-data-table tbody td:last-child {
    border-right: 1px solid rgba(20,108,240,.08) !important;
    border-radius: 0 20px 20px 0 !important;
}

body.dir-rtl .table-wrap tbody td:first-child,
body.dir-rtl .premium-data-table tbody td:first-child {
    border-right: 1px solid rgba(20,108,240,.08) !important;
    border-left: 0 !important;
    border-radius: 0 20px 20px 0 !important;
}

body.dir-rtl .table-wrap tbody td:last-child,
body.dir-rtl .premium-data-table tbody td:last-child {
    border-left: 1px solid rgba(20,108,240,.08) !important;
    border-right: 0 !important;
    border-radius: 20px 0 0 20px !important;
}

.table-wrap tbody tr:hover td,
.premium-data-table tbody tr:hover td {
    background: #f9fcff !important;
}

.table-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.table-round-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20,108,240,.14), rgba(21,198,232,.18));
    color: var(--dolph-blue);
    font-size: 17px;
}

.badge.success,
.badge.soft-green {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: rgba(4,120,87,.12) !important;
}

.badge.soft-blue {
    background: #eff6ff !important;
    color: #146cf0 !important;
    border-color: rgba(20,108,240,.12) !important;
}

.icon-btn,
.actions .icon-btn,
.actions a,
.actions button {
    border-radius: 13px !important;
    border: 1px solid rgba(20,108,240,.12) !important;
    background: #f7fbff !important;
    color: #146cf0 !important;
    padding: 8px 11px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    text-decoration: none !important;
}

.icon-btn:hover,
.actions .icon-btn:hover,
.actions a:hover,
.actions button:hover {
    background: #146cf0 !important;
    color: #fff !important;
}

@media (max-width: 1120px) {
    .dolph-top-navigation .main-nav {
        max-height: calc(100dvh - 116px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .language-menu,
    .account-menu {
        order: 3;
    }
}

@media (max-width: 860px) {
    .table-wrap table,
    .premium-data-table {
        min-width: 0 !important;
        display: block;
        border-spacing: 0 !important;
    }

    .table-wrap thead,
    .premium-data-table thead {
        display: none;
    }

    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td,
    .premium-data-table tbody,
    .premium-data-table tr,
    .premium-data-table td {
        display: block;
        width: 100%;
    }

    .table-wrap tbody tr,
    .premium-data-table tbody tr {
        margin-bottom: 14px;
        overflow: hidden;
        border: 1px solid rgba(20,108,240,.08);
    }

    .table-wrap tbody td,
    .premium-data-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        border: 0 !important;
        border-bottom: 1px solid rgba(20,108,240,.06) !important;
        border-radius: 0 !important;
    }

    .table-wrap tbody td::before,
    .premium-data-table tbody td::before {
        content: attr(data-label);
        font-size: 12px;
        color: #64748b;
        font-weight: 850;
        flex: 0 0 42%;
    }

    .table-wrap tbody td:last-child,
    .premium-data-table tbody td:last-child {
        border-bottom: 0 !important;
    }
}

/* v14.1 multilingual RTL and premium Arabic table polish */
html[dir="rtl"],
body.dir-rtl {
    direction: rtl;
    text-align: right;
    font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', Arial, sans-serif !important;
}

html[dir="ltr"],
body.dir-ltr {
    direction: ltr;
    text-align: left;
    font-family: 'IBM Plex Sans', 'IBM Plex Sans Arabic', Arial, sans-serif !important;
}

body.dir-rtl input,
body.dir-rtl select,
body.dir-rtl textarea,
body.dir-rtl button {
    font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', Arial, sans-serif !important;
}

body.dir-rtl .topbar.page-hero,
body.dir-rtl .panel-head,
body.dir-rtl .metric-card,
body.dir-rtl .quick-card,
body.dir-rtl .form-grid label,
body.dir-rtl .form-stack label {
    text-align: right;
}

body.dir-rtl .topbar.page-hero {
    justify-content: flex-start !important;
    flex-direction: row-reverse;
}

body.dir-rtl .hero-icon {
    margin-left: 0;
    margin-right: auto;
}

body.dir-rtl .topnav-inner,
body.dir-rtl .main-nav,
body.dir-rtl .topbar-actions,
body.dir-rtl .panel-head,
body.dir-rtl .form-actions,
body.dir-rtl .actions,
body.dir-rtl .table-icon-text {
    direction: rtl;
}

body.dir-rtl .nav-drop-menu,
body.dir-rtl .account-dropdown {
    text-align: right;
    right: auto;
    left: 0;
}

body.dir-rtl .form-grid input,
body.dir-rtl .form-grid select,
body.dir-rtl .form-grid textarea,
body.dir-rtl .form-stack input,
body.dir-rtl .form-stack select,
body.dir-rtl .form-stack textarea {
    direction: rtl;
    text-align: right;
}

body.dir-rtl input[type="email"],
body.dir-rtl input[name*="email"],
body.dir-rtl input[name*="url"],
body.dir-rtl input[name*="domain"],
body.dir-rtl input[name*="key"],
body.dir-rtl code,
body.dir-rtl pre {
    direction: ltr;
    text-align: left;
}

.panel {
    border-radius: 28px !important;
    border: 1px solid rgba(20,108,240,.10) !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow: 0 20px 55px rgba(20, 55, 100, .075) !important;
}

.panel-head {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(20,108,240,.08);
}

.panel-head h2 {
    color: #0f2e5c;
    font-size: 21px !important;
    letter-spacing: -.02em;
}

/* Screenshot-like table design */
.table-wrap,
.premium-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 0 !important;
}

.table-wrap table,
.premium-data-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    background: transparent !important;
    font-size: 13px !important;
}

.table-wrap thead th,
.premium-data-table thead th {
    background: #edf5ff !important;
    color: #385579 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    height: 54px;
    padding: 12px 18px !important;
    border: 0 !important;
    vertical-align: middle;
    white-space: nowrap;
}

.table-wrap thead th:first-child,
.premium-data-table thead th:first-child {
    border-radius: 18px 0 0 18px !important;
}

.table-wrap thead th:last-child,
.premium-data-table thead th:last-child {
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap thead th,
body.dir-rtl .premium-data-table thead th,
body.dir-rtl .table-wrap tbody td,
body.dir-rtl .premium-data-table tbody td {
    text-align: right !important;
}

body.dir-rtl .table-wrap thead th:first-child,
body.dir-rtl .premium-data-table thead th:first-child {
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap thead th:last-child,
body.dir-rtl .premium-data-table thead th:last-child {
    border-radius: 18px 0 0 18px !important;
}

.table-wrap tbody tr,
.premium-data-table tbody tr {
    background: #fff !important;
}

.table-wrap tbody td,
.premium-data-table tbody td {
    background: #fff !important;
    color: #223957 !important;
    font-size: 13px !important;
    font-weight: 650;
    height: 72px;
    padding: 13px 18px !important;
    border-top: 1px solid #dbeafe !important;
    border-bottom: 1px solid #dbeafe !important;
    vertical-align: middle;
}

.table-wrap tbody td:first-child,
.premium-data-table tbody td:first-child {
    border-left: 1px solid #dbeafe !important;
    border-radius: 18px 0 0 18px !important;
}

.table-wrap tbody td:last-child,
.premium-data-table tbody td:last-child {
    border-right: 1px solid #dbeafe !important;
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap tbody td:first-child,
body.dir-rtl .premium-data-table tbody td:first-child {
    border-right: 1px solid #dbeafe !important;
    border-left: 0 !important;
    border-radius: 0 18px 18px 0 !important;
}

body.dir-rtl .table-wrap tbody td:last-child,
body.dir-rtl .premium-data-table tbody td:last-child {
    border-left: 1px solid #dbeafe !important;
    border-right: 0 !important;
    border-radius: 18px 0 0 18px !important;
}

.table-wrap tbody tr:hover td,
.premium-data-table tbody tr:hover td {
    background: #fbfdff !important;
    border-color: #bfdbfe !important;
}

.actions,
.table-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.dir-rtl .actions,
body.dir-rtl .table-actions {
    justify-content: flex-start;
}

.icon-btn,
.actions a,
.actions button,
a.action-icon,
button.action-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #9ec5ff !important;
    background: #f7fbff !important;
    color: #146cf0 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.icon-btn::before,
.actions a::before,
.actions button::before,
a.action-icon::before,
button.action-icon::before {
    font-size: 18px;
    font-weight: 900;
    content: attr(data-action-icon);
}

.icon-btn[data-action="edit"]::before,
.actions a[data-action="edit"]::before,
.actions button[data-action="edit"]::before { content: "✎"; }
.icon-btn[data-action="view"]::before,
.actions a[data-action="view"]::before,
.actions button[data-action="view"]::before { content: "◉"; }
.icon-btn[data-action="delete"]::before,
.actions a[data-action="delete"]::before,
.actions button[data-action="delete"]::before { content: "🗑"; }

.icon-btn[data-action="delete"],
.actions a[data-action="delete"],
.actions button[data-action="delete"] {
    color: #f43f5e !important;
    border-color: #fecdd3 !important;
    background: #fff7f8 !important;
}

.icon-btn:hover,
.actions a:hover,
.actions button:hover {
    transform: translateY(-1px);
    filter: brightness(.98);
}

.badge,
.pill,
.status-pill {
    border-radius: 999px !important;
    padding: 8px 13px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    background: #f1f7ff !important;
    color: #123d73 !important;
    border: 1px solid #d9e8ff !important;
}

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

.translation-row {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(20,108,240,.12);
    border-radius: 18px;
    background: #f8fbff;
}

.translation-source {
    color: #385579;
    font-weight: 850;
    font-size: 12px;
}

.inline-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.copy-english-form {
    margin-top: 14px;
}

.swal2-container {
    z-index: 999999 !important;
}

@media (max-width: 860px) {
    .translation-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap table,
    .premium-data-table {
        min-width: 0 !important;
    }

    .table-wrap tbody td,
    .premium-data-table tbody td {
        min-height: 58px;
        height: auto;
        text-align: inherit !important;
    }
}

/* v14.2 final RTL hero alignment, table action icons, and performance-friendly layout overrides */
body.dir-rtl .page-hero,
body.dir-rtl .topbar.page-hero {
    direction: rtl !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: right !important;
}

body.dir-rtl .page-hero .hero-icon,
body.dir-rtl .topbar.page-hero .hero-icon {
    order: 0 !important;
    flex: 0 0 auto !important;
    margin-left: 24px !important;
    margin-right: 0 !important;
}

body.dir-rtl .page-hero > div:not(.hero-icon),
body.dir-rtl .topbar.page-hero > div:not(.hero-icon) {
    order: 1 !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    text-align: right !important;
}

body.dir-rtl .page-hero h1,
body.dir-rtl .page-hero p,
body.dir-rtl .page-hero .muted,
body.dir-rtl .page-hero .hero-subtitle,
body.dir-rtl .topbar.page-hero h1,
body.dir-rtl .topbar.page-hero p,
body.dir-rtl .topbar.page-hero .muted,
body.dir-rtl .topbar.page-hero .hero-subtitle {
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

body.dir-ltr .page-hero,
body.dir-ltr .topbar.page-hero {
    direction: ltr !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
}

body.dir-ltr .page-hero .hero-icon,
body.dir-ltr .topbar.page-hero .hero-icon {
    order: 0 !important;
    margin-right: 24px !important;
    margin-left: 0 !important;
}

body.dir-ltr .page-hero > div:not(.hero-icon),
body.dir-ltr .topbar.page-hero > div:not(.hero-icon) {
    text-align: left !important;
    margin: 0 !important;
}

body.dir-ltr .page-hero h1,
body.dir-ltr .page-hero p,
body.dir-ltr .page-hero .muted,
body.dir-ltr .page-hero .hero-subtitle,
body.dir-ltr .topbar.page-hero h1,
body.dir-ltr .topbar.page-hero p,
body.dir-ltr .topbar.page-hero .muted,
body.dir-ltr .topbar.page-hero .hero-subtitle {
    text-align: left !important;
}

.actions a,
.actions button,
.table-actions a,
.table-actions button,
table a.action-icon,
table button.action-icon,
table .icon-btn,
.icon-only-action {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    color: #146cf0 !important;
    background: #f7fbff !important;
    border: 1px solid #9ec5ff !important;
    text-decoration: none !important;
}

.actions a::before,
.actions button::before,
.table-actions a::before,
.table-actions button::before,
table a.action-icon::before,
table button.action-icon::before,
table .icon-btn::before,
.icon-only-action::before {
    text-indent: 0 !important;
    font-size: 17px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    content: attr(data-action-icon) !important;
}

.actions a[data-action="edit"]::before,
.actions button[data-action="edit"]::before,
.table-actions a[data-action="edit"]::before,
.table-actions button[data-action="edit"]::before,
table a.action-icon[data-action="edit"]::before,
table button.action-icon[data-action="edit"]::before { content: "✎" !important; }

.actions a[data-action="view"]::before,
.actions button[data-action="view"]::before,
.table-actions a[data-action="view"]::before,
.table-actions button[data-action="view"]::before,
table a.action-icon[data-action="view"]::before,
table button.action-icon[data-action="view"]::before { content: "◉" !important; }

.actions a[data-action="delete"]::before,
.actions button[data-action="delete"]::before,
.table-actions a[data-action="delete"]::before,
.table-actions button[data-action="delete"]::before,
table a.action-icon[data-action="delete"]::before,
table button.action-icon[data-action="delete"]::before { content: "🗑" !important; }

.actions a[data-action="delete"],
.actions button[data-action="delete"],
.table-actions a[data-action="delete"],
.table-actions button[data-action="delete"],
table a.action-icon[data-action="delete"],
table button.action-icon[data-action="delete"] {
    color: #f43f5e !important;
    border-color: #fecdd3 !important;
    background: #fff7f8 !important;
}

@media (max-width: 760px) {
    body.dir-rtl .page-hero,
    body.dir-rtl .topbar.page-hero,
    body.dir-ltr .page-hero,
    body.dir-ltr .topbar.page-hero {
        align-items: flex-start !important;
        min-height: auto !important;
        padding: 28px 24px !important;
    }
}
