﻿:root {
    --bg: #f5f7fb;
    --card: rgba(255,255,255,.88);
    --card2: rgba(255,255,255,.70);
    --bd: rgba(15,23,42,.08);
    --txt: #0f172a;
    --mut: #64748b;
    --brand: #4f46e5;
    --ok: #16a34a;
    --warn: #d97706;
    --info: #0284c7;
    --danger: #dc2626;
}

html, body {
    height: 100%;
}

body {
    color: var(--txt);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: .96;
}

.cardx {
    border: 1px solid var(--bd);
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15,23,42,.08);
    overflow: hidden;
}

.cardx .hd {
    padding: 16px 16px 12px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15,23,42,.06);
}

.cardx .hd h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.cardx .hd p {
    margin: 6px 0 0;
    color: var(--mut);
    font-size: 13px;
}

.cardx .bd {
    padding: 16px;
}

.grid {
    display: grid;
    gap: 14px;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0,1fr));
}

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0,1fr));
}

@media (max-width: 992px) {
    .grid.cols-2, .grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

.label {
    font-size: 12px;
    color: var(--mut);
    font-weight: 700;
}

.help {
    font-size: 12px;
    color: var(--mut);
    line-height: 1.6;
}

.inputx, .selectx, .textareax {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.10);
    background: #fff;
    color: var(--txt);
    outline: none;
}

.inputx:focus, .selectx:focus, .textareax:focus {
    border-color: rgba(79,70,229,.35);
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.btnx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.96);
    color: var(--txt);
    font-weight: 800;
    font-size: 13px;
    transition: .2s transform,.2s opacity,.2s box-shadow;
}

.btnx:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.btnx:active {
    transform: translateY(0);
    opacity: .92;
}

.btnx.primary {
    background: linear-gradient(135deg, var(--brand), #0ea5e9);
    border-color: transparent;
    color: #fff;
}

.btnx.danger {
    background: rgba(220,38,38,.08);
    border-color: rgba(220,38,38,.18);
    color: #991b1b;
}

.badgex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    font-size: 12px;
    font-weight: 900;
    background: rgba(255,255,255,.95);
}

.badgex.brand {
    background: rgba(79,70,229,.10);
    border-color: rgba(79,70,229,.20);
    color: #4338ca;
}

.badgex.success {
    background: rgba(22,163,74,.10);
    border-color: rgba(22,163,74,.20);
    color: #166534;
}

.badgex.warn {
    background: rgba(217,119,6,.10);
    border-color: rgba(217,119,6,.20);
    color: #92400e;
}

.badgex.info {
    background: rgba(2,132,199,.10);
    border-color: rgba(2,132,199,.20);
    color: #075985;
}

.badgex.danger {
    background: rgba(220,38,38,.10);
    border-color: rgba(220,38,38,.20);
    color: #991b1b;
}

/* tables */
.tablex {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.tablex thead th {
    text-align: right;
    font-size: 12px;
    color: var(--mut);
    font-weight: 800;
    padding: 0 10px 8px;
}

.tablex tbody tr {
    background: transparent;
}

.tablex tbody td {
    padding: 12px 10px;
    border-top: 1px solid rgba(15,23,42,.06);
    border-bottom: 1px solid rgba(15,23,42,.06);
    background: rgba(255,255,255,.95);
    vertical-align: middle;
}

.tablex tbody tr td:first-child {
    border-right: 1px solid rgba(15,23,42,.06);
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.tablex tbody tr td:last-child {
    border-left: 1px solid rgba(15,23,42,.06);
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

/* mobile cards */
.table-cards {
    display: none;
}

@media (max-width: 992px) {
    .tablex {
        display: none;
    }

    .table-cards {
        display: grid;
        gap: 12px;
    }

    .rowcard {
        border: 1px solid rgba(15,23,42,.08);
        background: rgba(255,255,255,.92);
        border-radius: 16px;
        padding: 14px;
        box-shadow: 0 10px 24px rgba(15,23,42,.06);
    }

    .rowcard .k {
        color: var(--mut);
        font-size: 12px;
        font-weight: 800;
    }

    .rowcard .v {
        margin-top: 4px;
    }
}

td, .v, .help {
    word-break: break-word;
}

/* timeline */
.timeline-wrapper {
    position: relative;
    padding-right: 20px;
}

.timeline-wrapper::before {
    content: "";
    position: absolute;
    right: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(15,23,42,.10);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-right: 30px;
}

.timeline-dot {
    position: absolute;
    right: 0;
    top: 8px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.timeline-content {
    padding: 14px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 14px;
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .timeline-wrapper::before {
        right: 6px;
    }

    .timeline-dot {
        width: 14px;
        height: 14px;
    }
}

select option {
    background-color: #ffffff;
    color: #0f172a;
}
.main > .page,
.main > section.page {
    max-width: 1200px;
    margin: 0 auto;
}

.topbar strong {
    font-size: 15px;
}

.nav a span:last-child,
.bottom-nav span:first-child {
    font-size: 18px;
}
.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pwa-modal-backdrop.show {
    display: flex;
}

.pwa-modal {
    width: min(420px, 100%);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;

    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);

    animation: pwaModalIn 0.25s ease both;
}

.pwa-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;

    border-radius: 22px;
    display: grid;
    place-items: center;

    font-size: 34px;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.28);
}

.pwa-modal h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.pwa-modal p {
    margin: 12px 0 24px;
    color: #64748b;
    line-height: 1.8;
    font-size: 15px;
}

.pwa-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@keyframes pwaModalIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .pwa-modal {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .pwa-actions {
        grid-template-columns: 1fr;
    }
}