body {
    background: #f5f7fb;
    color: #1f2937;
}

.front-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, #07111f 0%, #0f3d37 52%, #1d3b63 100%);
}

.front-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
}

.front-brand {
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .22);
}

.ai-front-page {
    color: #172033;
}

.ai-shell {
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
}

.ai-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 .85rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #c8f7e4;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ai-title {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(2.15rem, 4vw, 4.2rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0;
}

.ai-subtitle {
    max-width: 660px;
    color: rgba(255, 255, 255, .82);
    font-size: 1.08rem;
    line-height: 1.8;
}

.ai-service-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.ai-service-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .82rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: .9rem;
    font-weight: 600;
}

.redeem-panel {
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.redeem-input {
    min-height: 58px;
    border-color: #d6dde8;
    background: #f8fafc;
}

.redeem-input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 .25rem rgba(20, 184, 166, .18);
}

.redeem-button {
    min-height: 56px;
    border: 0;
    background: #0f9f6e;
    font-weight: 700;
}

.redeem-button:hover,
.redeem-button:focus {
    background: #0b845c;
}

.ai-status-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin-top: .35rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, .12);
}

.ai-note {
    color: #64748b;
    font-size: .9rem;
}

.admin-link {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

.admin-link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

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

.ai-info-block,
.ai-matrix {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 22px 70px rgba(15, 23, 42, .2);
}

.ai-info-block {
    padding: 1.15rem;
    color: #334155;
    line-height: 1.75;
}

.ai-info-primary {
    grid-column: 1 / -1;
}

.ai-block-label {
    margin-bottom: .55rem;
    color: #0f766e;
    font-size: .86rem;
    font-weight: 800;
}

.ai-matrix {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.ai-matrix-item {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
    padding: 1rem;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ai-matrix-item:last-child {
    border-right: 0;
}

.ai-matrix-item span {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.3rem;
}

.ai-matrix-item small {
    color: #64748b;
    font-weight: 600;
}

.admin-body .card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.stat-card {
    min-height: 112px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.table td,
.table th {
    vertical-align: middle;
}

.text-truncate-260 {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-360 {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-help {
    color: #6b7280;
    font-size: .875rem;
}

.code-result {
    background: #0f172a;
    color: #e5f6ff;
    border-radius: 8px;
    padding: 1rem;
}

.redeem-content {
    color: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .95rem;
    line-height: 1.7;
}

.required::after {
    content: " *";
    color: #dc3545;
}

@media (max-width: 991.98px) {
    .ai-shell {
        min-height: auto;
    }

    .ai-info-grid {
        grid-template-columns: 1fr;
    }

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

    .ai-matrix-item:nth-child(2) {
        border-right: 0;
    }

    .ai-matrix-item:nth-child(-n + 2) {
        border-bottom: 1px solid #e2e8f0;
    }
}

@media (max-width: 575.98px) {
    .ai-title {
        font-size: 2.15rem;
    }

    .ai-service-strip span {
        min-height: 32px;
        font-size: .84rem;
    }

    .redeem-panel .card-body {
        padding: 1.25rem !important;
    }
}

/* AI redeem landing */
.ai-front-page.front-page {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(135deg, #07111f 0%, #0b2535 45%, #12372f 100%);
    background-size: 56px 56px, 56px 56px, auto;
}

.ai-landing {
    min-height: 100vh;
    color: #e5eefc;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 48px;
    margin-bottom: 3.5rem;
}

.ai-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #f8fafc;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0;
}

.ai-brand:hover {
    color: #ffffff;
}

.ai-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(94, 234, 212, .45);
    border-radius: 8px;
    background: #0f766e;
    color: #ecfeff;
    font-weight: 900;
}

.ai-buy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1rem;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    background: #fbbf24;
    color: #111827;
    font-size: .95rem;
    font-weight: 800;
    text-decoration: none;
}

.ai-buy-link:hover,
.ai-buy-link:focus {
    background: #f59e0b;
    color: #111827;
}

.ai-hero {
    padding-bottom: 3rem;
}

.ai-kicker {
    border-color: rgba(94, 234, 212, .36);
    background: rgba(8, 47, 73, .5);
    color: #99f6e4;
}

.ai-title {
    color: #f8fafc;
    font-size: 3.65rem;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: none;
}

.ai-subtitle {
    color: #dbeafe;
    font-size: 1.18rem;
    line-height: 1.8;
}

.ai-service-strip span {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

.redeem-console,
.ai-visual-panel,
.ai-info-card {
    border: 1px solid rgba(203, 213, 225, .5);
    border-radius: 8px;
    background: rgba(248, 250, 252, .96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.redeem-console {
    padding: 1.25rem;
}

.console-header,
.visual-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.console-label {
    margin-bottom: .35rem;
    color: #0f766e;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: 0;
}

.console-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
}

.console-state {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 28px;
    padding: 0 .65rem;
    border: 1px solid rgba(34, 197, 94, .42);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(22, 101, 52, .22);
    font-size: .76rem;
    font-weight: 900;
}

.console-state span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
}

.console-copy {
    margin-bottom: 1.1rem;
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
}

.redeem-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 136px;
    gap: .75rem;
}

.redeem-input {
    min-height: 56px;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0;
}

.redeem-input::placeholder {
    color: #64748b;
}

.redeem-input:focus {
    border-color: #0f766e;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 0 0 .22rem rgba(45, 212, 191, .14);
}

.redeem-button {
    min-height: 56px;
    border: 0;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 900;
}

.redeem-button:hover,
.redeem-button:focus {
    background: #f59e0b;
    color: #111827;
}

.console-foot {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.console-foot span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 .65rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    font-size: .8rem;
    font-weight: 700;
}

.ai-visual-panel {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.ai-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 118, 110, .08) 1px, transparent 1px),
        linear-gradient(rgba(15, 118, 110, .08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .75;
    pointer-events: none;
}

.ai-visual-panel > * {
    position: relative;
}

.visual-top strong {
    color: #0f172a;
    font-size: 1.15rem;
}

.visual-top > span {
    color: #b45309;
    font-size: .8rem;
    font-weight: 900;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.model-node {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
}

.model-node.active {
    border-color: #0f766e;
    background: #ecfdf5;
}

.model-node span {
    color: #0f172a;
    font-size: 1.7rem;
    font-weight: 900;
}

.model-node small {
    color: #475569;
    font-weight: 800;
}

.signal-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.signal-board div,
.delivery-steps div {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    padding: .85rem;
}

.signal-board span,
.delivery-steps span {
    display: block;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.signal-board strong {
    display: block;
    margin-top: .35rem;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}

.delivery-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.delivery-steps b {
    display: block;
    margin-bottom: .35rem;
    color: #0f766e;
    font-size: .82rem;
}

.ai-support-section {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0 2rem;
}

.ai-info-card {
    padding: 1rem;
    color: #334155;
    font-size: .98rem;
    line-height: 1.75;
}

.ai-block-label {
    color: #0f766e;
    font-size: .9rem;
}

@media (max-width: 1199.98px) {
    .ai-topbar {
        margin-bottom: 3rem;
    }

    .ai-title {
        font-size: 3.2rem;
    }

    .ai-support-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .ai-topbar {
        margin-bottom: 2rem;
    }

    .ai-title {
        font-size: 2.45rem;
    }

    .redeem-control,
    .signal-board,
    .delivery-steps {
        grid-template-columns: 1fr;
    }

    .model-grid {
        grid-template-columns: 1fr;
    }
}

/* Light AI landing */
.ai-light-page.front-page {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(14, 165, 233, .08) 1px, transparent 1px),
        linear-gradient(rgba(14, 165, 233, .08) 1px, transparent 1px),
        linear-gradient(135deg, #f8fbff 0%, #eef8ff 45%, #f4fff9 100%);
    background-size: 44px 44px, 44px 44px, auto;
    color: #102033;
}

.ai-light-main {
    min-height: 100vh;
    padding: 1.25rem 0 2rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-light-nav {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 4.25rem;
}

.ai-light-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #0f172a;
    text-decoration: none;
}

.ai-light-brand:hover {
    color: #0f172a;
}

.ai-light-brand span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(14, 165, 233, .25);
}

.ai-light-brand strong {
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-light-buy {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.05rem;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    background: #ffffff;
    color: #0369a1;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(14, 165, 233, .14);
}

.ai-light-buy:hover,
.ai-light-buy:focus {
    background: #0ea5e9;
    color: #ffffff;
}

.ai-light-hero {
    padding-bottom: 3.25rem;
}

.ai-light-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .8rem;
    margin-bottom: 1rem;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #f0f9ff;
    color: #0284c7;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ai-light-title {
    max-width: 680px;
    margin: 0 0 1rem;
    color: #08111f;
    font-size: 4rem;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: 0;
}

.ai-light-subtitle {
    max-width: 620px;
    margin: 0 0 1.35rem;
    color: #53657c;
    font-size: 1.12rem;
    line-height: 1.85;
}

.ai-light-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    max-width: 620px;
}

.ai-light-service {
    min-height: 82px;
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.ai-light-service b {
    display: block;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 900;
}

.ai-light-service span {
    display: block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .9rem;
    font-weight: 650;
}

.ai-light-redeem {
    padding: 1.35rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 26px 80px rgba(2, 132, 199, .16);
    backdrop-filter: blur(14px);
}

.ai-light-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-light-card-head span {
    display: block;
    margin-bottom: .3rem;
    color: #0ea5e9;
    font-size: .74rem;
    font-weight: 950;
    letter-spacing: 0;
}

.ai-light-card-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 950;
}

.ai-light-card-head em {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 .75rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    font-style: normal;
    font-size: .82rem;
    font-weight: 900;
}

.ai-light-card-copy {
    margin-bottom: 1.2rem;
    color: #64748b;
    line-height: 1.75;
}

.ai-light-input {
    min-height: 58px;
    margin-bottom: .9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 750;
}

.ai-light-input:focus {
    border-color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 0 0 .24rem rgba(14, 165, 233, .14);
}

.ai-light-submit {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 950;
    box-shadow: 0 18px 36px rgba(20, 184, 166, .24);
}

.ai-light-submit:hover,
.ai-light-submit:focus {
    background: linear-gradient(135deg, #0284c7, #0f766e);
}

.ai-light-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.ai-light-checks span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 .7rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: .82rem;
    font-weight: 800;
}

.ai-light-info {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 1rem;
    padding-bottom: 2rem;
}

.ai-light-info article {
    min-height: 154px;
    padding: 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .05);
}

.ai-light-info span {
    display: block;
    margin-bottom: .55rem;
    color: #0369a1;
    font-size: .9rem;
    font-weight: 950;
}

.ai-light-info p {
    margin: 0;
    color: #526276;
    line-height: 1.78;
}

@media (max-width: 1199.98px) {
    .ai-light-nav {
        margin-bottom: 2.75rem;
    }

    .ai-light-title {
        font-size: 3.15rem;
    }

    .ai-light-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .ai-light-main {
        padding-top: .75rem;
    }

    .ai-light-nav {
        margin-bottom: 2rem;
    }

    .ai-light-title {
        font-size: 2.35rem;
    }

    .ai-light-subtitle {
        font-size: 1rem;
    }

    .ai-light-services {
        grid-template-columns: 1fr;
    }

    .ai-light-redeem {
        padding: 1.05rem;
    }
}
