@import url('report-base.css');

body {
    min-height: 100vh
}

.site-main {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 36px 0 70px
}

.main-topbar {
    gap: 24px
}

.auth-brand img, .topbar.main-topbar img {
    width: 100px;
}

.app-nav .nav-link {
    text-decoration: none;
    display: flex;
    align-items: center
}

.account-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.account-nav .profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer
}

.account-nav .menu {
    content: '';
    border: 1px solid var(--line);
    padding: 10px;
    position: absolute;
    top: calc(100% + 24px);
    right: 16px;
    width: 200px;
    min-height: 100px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: 300ms;
}

.account-nav .menu.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.account-nav .top-action {
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 10;
    background: #fff;
    font-size: 15px;
    padding: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line)
}

.avatar-fallback {
    display: grid;
    place-items: center;
    background: var(--blue-2);
    color: var(--blue);
    font-weight: 800
}

.account-copy {
    display: grid;
    min-width: 110px
}

.account-copy strong {
    font-size: 12px
}

.account-copy small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px
}

.top-action {
    font-size: 12px;
    font-weight: 700;
    color: #445067;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px
}

.top-action:hover {
    background: #f3f6fb
}

.site-footer {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto 30px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    border-top: 1px solid var(--line);
    padding-top: 18px
}

.flash-wrap {
    width: min(1240px, calc(100% - 40px));
    margin: 18px auto -8px
}

.flash {
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px solid
}

.flash.success {
    background: #e9f8f1;
    border-color: #c7eedc;
    color: #0b7c4d
}

.flash.error {
    background: #fff0f1;
    border-color: #ffd3d6;
    color: #a7282d
}

.flash.info {
    background: #eef5ff;
    border-color: #d5e7ff;
    color: #245a9b
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px
}

.page-title h1 {
    margin: 4px 0 8px;
    font-size: 32px;
    letter-spacing: -.035em
}

.page-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6
}

.btn,
.btn-secondary,
.btn-danger,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 9px;
    font-weight: 700;
    border: 0;
    cursor: pointer
}

.btn {
    background: var(--blue);
    color: #fff;
    padding: 11px 16px
}

.btn-secondary {
    background: #fff;
    border: 1px solid #ccd5e2;
    color: #344056;
    padding: 10px 15px
}

.btn-danger {
    background: #c9363e;
    color: #fff;
    padding: 10px 15px
}

.btn-small {
    font-size: 11px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #d5dce7;
    color: #3b475d
}

.btn-small.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff
}

.btn-small.danger {
    color: #a7282d;
    border-color: #f1c8cb;
    background: #fff7f7
}

.btn:disabled {
    opacity: .6;
    cursor: wait
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px
}

.stat-card {
    padding: 18px
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em
}

.stat-card strong {
    display: block;
    font-size: 30px;
    margin-top: 8px;
    letter-spacing: -.04em
}

.panel {
    padding: 20px
}

.panel h2,
.panel h3 {
    margin: 0 0 14px
}

.panel p.help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.form-field {
    display: grid;
    gap: 7px
}

.form-field.full {
    grid-column: 1/-1
}

.form-field label {
    font-size: 12px;
    font-weight: 700;
    color: #465269
}

.form-field input,
.form-field select {
    width: 100%
}

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

.inline-form {
    display: inline
}

.danger-zone {
    border: 1px solid #ffd1d4;
    background: #fff9f9
}

.danger-zone h3 {
    color: #a7282d
}

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

.table-card {
    overflow: hidden
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.data-table th {
    background: #f8faff;
    color: #516079;
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #edf0f5;
    vertical-align: top
}

.data-table tr:last-child td {
    border-bottom: 0
}

.data-table a {
    color: var(--blue);
    text-decoration: none
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.status-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800
}

.status-badge.active,
.status-badge.user {
    background: #e9f8f1;
    color: #0b7c4d
}

.status-badge.disabled {
    background: #fff0f1;
    color: #a7282d
}

.status-badge.admin {
    background: #eaf3ff;
    color: #1d73ea
}

.score-badge {
    font-weight: 800
}

.filter-bar {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe
}

.filter-bar input,
.filter-bar select {
    height: 42px
}

.filter-bar .btn-secondary {
    height: 42px
}

.muted {
    color: var(--muted)
}

.auth-body {
    background: linear-gradient(160deg, #f4f8ff, #f7f8fb 46%, #eef4ff);
    min-height: 100vh
}

.auth-shell {
    width: min(440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0
}

.auth-brand {
    justify-content: center;
    margin-bottom: 24px
}

.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(29, 55, 90, .09);
    padding: 28px
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -.035em
}

.auth-card>p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 13px
}

.auth-form {
    display: grid;
    gap: 13px
}

.auth-form label {
    font-size: 12px;
    font-weight: 700;
    color: #465269
}

.auth-form .field-wrap {
    display: grid;
    gap: 6px
}

.auth-form input {
    height: 46px
}

.auth-submit {
    height: 46px
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 46px;
    border: 1px solid #ccd5e2;
    border-radius: 9px;
    background: #fff;
    color: #2f3a4d;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px
}

.google-g {
    font-weight: 900;
    color: #4285f4;
    font-size: 16px
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #98a2b3;
    font-size: 11px;
    margin: 16px 0
}

.divider:before,
.divider:after {
    content: "";
    height: 1px;
    background: #e4e7ec;
    flex: 1
}

.auth-links {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px
}

.auth-links a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 700
}

.auth-error {
    background: #fff0f1;
    color: #a7282d;
    border: 1px solid #ffd3d6;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 14px
}

.auth-success {
    background: #e9f8f1;
    color: #0b7c4d;
    border: 1px solid #c7eedc;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 14px
}

.local-reset {
    word-break: break-all;
    background: #f8faff;
    border: 1px dashed #b9c9df;
    padding: 11px;
    border-radius: 9px;
    font-size: 12px;
    margin-top: 14px
}

.local-reset a {
    color: var(--blue)
}

.audit-card {
    padding: 20px;
    margin-bottom: 22px
}

.audit-form-v2 {
    display: grid;
    grid-template-columns: 1.25fr 1fr 150px;
    gap: 14px;
    align-items: end
}

.mode-switch {
    display: flex;
    gap: 8px
}

.mode-option {
    border: 1px solid #d7deea;
    border-radius: 10px;
    padding: 10px 11px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    cursor: pointer;
    flex: 1;
    background: #fff
}

.mode-option.active {
    border-color: #8bbbf8;
    background: #f4f9ff
}

.mode-option input {
    width: auto;
    height: auto;
    margin-top: 3px
}

.mode-option span {
    display: grid
}

.mode-option strong {
    font-size: 12px
}

.mode-option small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.35
}

.loading-overlay {
    padding: 24px;
    margin: 18px 0
}

.loading-progress {
    height: 6px;
    background: #edf1f7;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px
}

.loading-progress span {
    display: block;
    height: 100%;
    background: var(--blue);
    width: 10%;
    transition: width .5s
}

.audit-history-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 12px
}

.audit-history-title h2 {
    margin: 0;
    font-size: 18px
}

.report-shell {
    display: grid;
    gap: 22px
}

.mobile-show {
    display: none
}

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

    .audit-form-v2 {
        grid-template-columns: 1fr
    }

    .mode-switch {
        flex-direction: column
    }

    .grid-2 {
        grid-template-columns: 1fr
    }


    .app-nav {
        overflow-x: auto
    }

    .main-topbar {
        padding: 0 14px;
        gap: 10px
    }

    .top-action {
        padding: 7px 6px
    }

    .site-main {
        width: min(100% - 24px, 1240px)
    }
}

@media(max-width:620px) {

    .mobile-show {
        display: block
    }

    nav.topnav.app-nav {
        display: none
    }

    .account-copy {
        display: grid;
        min-width: auto;
    }

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

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

    .form-field.full {
        grid-column: auto
    }

    .page-title {
        display: block
    }

    .site-footer {
        display: block
    }

    .site-footer span {
        display: block;
        margin-top: 5px
    }

    .page-title h1 {
        font-size: 23px;
    }

    .page-title p {
        font-size: 12px;
    }
}