*,
::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --black: #050400;
    --black2: rgba(8, 6, 0, 0.6);
    --black3: rgba(4, 4, 4, 0.50);
    --gold: #c9a84c;
    --gold2: #e8c96a;
    --gold-bd: rgba(255, 255, 255, 0.07);
    --bd: rgba(255, 255, 255, 0.07);
    --bd-hover: rgba(255, 255, 255, 0.14);
    --txt1: rgba(255, 255, 255, 0.88);
    --txt2: rgba(255, 255, 255, 0.45);
    --txt3: rgba(255, 255, 255, 0.22);
    --muted: rgba(255, 255, 255, 0.38);
    --muted2: rgba(255, 255, 255, 0.65)
}

#loginScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020201;
    overflow: hidden
}

.login-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 2, 1, .92) 0, rgba(2, 2, 1, .35) 32%, transparent 52%, rgba(2, 2, 1, .15) 78%, rgba(2, 2, 1, .6) 100%);
    pointer-events: none
}

.login-dark-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(2, 2, 1, .97) 0, rgba(2, 2, 1, .6) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1
}

/* Volumetric fog canvas */
#loginFogCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0
}

#grain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: .028
}

@keyframes loginFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px)
    }

    100% {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes loginBtnGlow {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(201, 168, 76, .05)
    }

    50% {
        box-shadow: 0 0 22px rgba(201, 168, 76, .14)
    }
}

.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 56px 48px;
    background: 0 0;
    border: none
}

.login-logo {
    display: block;
    width: 200px;
    height: auto;
    margin: 0 auto 24px;
    opacity: 0;
    animation: loginFadeIn .8s ease .3s forwards
}

.login-subtitle {
    text-align: center;
    font-family: Syncopate, sans-serif;
    font-size: .52rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .4);
    margin-bottom: 36px;
    opacity: 0;
    animation: loginFadeIn .6s ease .6s forwards
}

.login-field {
    margin-bottom: 24px;
    opacity: 0;
    animation: loginFadeIn .6s ease forwards
}

.login-field:nth-child(4) {
    animation-delay: .8s
}

.login-field:nth-child(5) {
    animation-delay: .95s
}

.login-label {
    display: block;
    font-family: Syncopate, sans-serif;
    font-size: .55rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .5);
    margin-bottom: 8px
}

.login-input {
    width: 100%;
    background: 0 0;
    border: none;
    border-bottom: 1px solid rgba(201, 168, 76, .3);
    color: rgba(255, 255, 255, .85);
    font-family: Lora, serif;
    font-size: 1.15rem;
    padding: 14px 14px;
    transition: border-color .25s;
    outline: 0
}

.login-input:focus {
    border-bottom-color: rgba(201, 168, 76, .6)
}

.login-input::placeholder {
    color: rgba(255, 255, 255, .2)
}

.login-error {
    font-size: .42rem;
    color: rgba(220, 80, 60, .85);
    margin-bottom: 14px;
    min-height: 22px;
    font-family: Syncopate, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .8);
    background: 0 0;
    border: 1px solid rgba(201, 168, 76, .3);
    cursor: pointer;
    transition: border-color .3s, color .3s, box-shadow .3s;
    font-weight: 700;
    margin-top: 8px;
    opacity: 0;
    animation: loginFadeIn .6s ease 1.1s forwards
}

.login-btn:hover {
    border-color: rgba(201, 168, 76, .6);
    color: #c9a84c;
    box-shadow: 0 0 22px rgba(201, 168, 76, .14)
}

.login-btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    opacity: 0;
    animation: loginFadeIn .6s ease 1.3s forwards
}

.login-link {
    background: 0 0;
    border: none;
    color: rgba(255, 255, 255, .25);
    font-family: Syncopate, sans-serif;
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s;
    padding: 0
}

.login-link:hover {
    color: rgba(255, 255, 255, .5)
}

.login-link strong {
    color: rgba(201, 168, 76, .5)
}

.login-link:hover strong {
    color: rgba(201, 168, 76, .75)
}

.login-success {
    font-size: .42rem;
    color: rgba(140, 200, 100, .85);
    margin-bottom: 14px;
    min-height: 22px;
    font-family: Syncopate, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase
}

@media(max-width:560px) {
    .login-card {
        margin: 0 16px;
        padding: 36px 24px
    }

    .login-logo {
        width: 120px
    }

    .login-input {
        font-size: .88rem;
        padding: 12px 2px
    }

    .login-btn {
        padding: 14px;
        font-size: .32rem;
        letter-spacing: .14em
    }

    .login-links {
        flex-direction: column;
        align-items: center;
        gap: 10px
    }

    .login-link {
        font-size: .42rem;
        text-align: center
    }
}

html {
    background: #040404
}

#appWrapper {
    width: 100%;
    max-width: 760px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative
}

body {
    background: #040404;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    /* Grid overlay removed — pure black background. */
    background-image: none;
}

@keyframes heroShimmer {
    0% {
        background-position: -300% center
    }

    100% {
        background-position: 300% center
    }
}

@keyframes heroPulse {

    0%,
    100% {
        opacity: .55;
        transform: scaleX(1)
    }

    50% {
        opacity: 1;
        transform: scaleX(1.04)
    }
}

@keyframes tabShimmer {
    0% {
        background-position: -200% center
    }

    100% {
        background-position: 200% center
    }
}

@keyframes borderSweep {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.app-hero {
    width: 100%;
    max-width: 720px;
    padding: 64px 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2
}

.hero-brand {
    margin-bottom: 20px
}

.hero-logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
    mix-blend-mode: screen;
    display: block
}

.logout-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 100;
    background: 0 0;
    border: none;
    color: rgba(201, 168, 76, .5);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s;
    padding: 0
}

.logout-btn svg {
    animation: logoutGlow 5s ease-in-out infinite
}

.logout-btn:hover {
    color: #c9a84c
}

@keyframes logoutGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(201, 168, 76, .1));
        opacity: .5
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(201, 168, 76, .5));
        opacity: 1
    }
}

.hero-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: .68rem;
    letter-spacing: .42em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .22);
    font-weight: 300;
    margin-bottom: 36px;
    text-indent: .42em
}

.hero-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 36px
}

.hero-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .3), transparent);
    background-size: 200% 100%;
    animation: heroPulse 3s ease-in-out infinite
}

.hero-divider-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(201, 168, 76, .6);
    box-shadow: 0 0 6px rgba(201, 168, 76, .5);
    flex-shrink: 0
}

.hero-nav {
    display: flex;
    align-items: center;
    gap: 32px
}

.hero-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .5);
    transition: color .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease
}

.hero-tab svg {
    color: rgba(201, 168, 76, .35);
    transition: color .25s
}

.hero-tab:active {
    opacity: .8
}

.hero-tab:not(.active):hover {
    border-color: rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .7);
    background: rgba(201, 168, 76, .03)
}

.hero-tab:not(.active):hover svg {
    color: rgba(201, 168, 76, .55)
}

@keyframes tabGradient {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.hero-tab.active {
    border-color: rgba(201, 168, 76, .3);
    background: rgba(201, 168, 76, .04);
    box-shadow: 0 0 16px rgba(201, 168, 76, .06)
}

.hero-tab.active span {
    background: linear-gradient(90deg, #8a6018, #c9a84c, #e8c96a, #fff, #e8c96a, #c9a84c, #8a6018);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: tabGradient 5s ease infinite
}

.hero-tab.active svg {
    color: #c9a84c
}

.view-panel {
    padding-top: 0;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%
}

.card {
    width: 100%;
    max-width: 720px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box
}

.card * {
    box-sizing: border-box
}

.dash-hero {
    margin-bottom: 3px
}

.dash-panel {
    margin-bottom: 3px;
    width: 100%
}

.dash-panel .panel-label {
    margin-bottom: 14px
}

.panel {
    background: rgba(4, 4, 4, .72);
    border: 1px solid var(--bd);
    margin-bottom: 3px;
    position: relative;
    overflow: hidden;
    width: 100%
}

.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04), rgba(255, 255, 255, .08), transparent)
}

.panel-body {
    padding: 24px 26px
}

.panel-label {
    font-family: Syncopate, sans-serif;
    font-size: .46rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px
}

.panel-label::before {
    content: '';
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, .2)
}

.panel-label[style*=justify-content]::before {
    display: none
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%
}

.layout-card {
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, .1);
    transition: all .25s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column
}

.layout-card:hover {
    border-color: rgba(255, 255, 255, .3)
}

.layout-card.active {
    border-color: rgba(201, 168, 76, .5);
    box-shadow: 0 0 16px rgba(201, 168, 76, .1)
}

.layout-card.active::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 7px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700
}

.layout-thumb {
    width: 100%;
    height: 70px;
    overflow: hidden;
    flex-shrink: 0
}

.layout-name {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
    padding: 6px 8px;
    text-align: center;
    background: rgba(4, 4, 4, .65);
    margin-top: auto
}

.layout-card.active .layout-name {
    color: rgba(255, 255, 255, .9)
}

.upload-zone {
    border: 1px dashed rgba(201, 168, 76, .12);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: rgba(201, 168, 76, .02);
    position: relative
}

.upload-zone.drag-over,
.upload-zone:hover {
    border-color: rgba(201, 168, 76, .25);
    background: rgba(201, 168, 76, .05)
}

.upload-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%
}

@keyframes uploadRingPulse {

    0%,
    100% {
        border-color: rgba(201, 168, 76, .2);
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0)
    }

    50% {
        border-color: rgba(201, 168, 76, .5);
        box-shadow: 0 0 0 6px rgba(201, 168, 76, .06)
    }
}

.upload-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 168, 76, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    animation: uploadRingPulse 5s ease-in-out infinite
}

.upload-icon-circle svg {
    animation: logoIconPulse 5s ease-in-out infinite
}

.upload-zone.drag-over .upload-icon-circle,
.upload-zone:hover .upload-icon-circle {
    border-color: rgba(201, 168, 76, .45)
}

.upload-icon {
    width: 42px;
    height: 42px;
    border: 1px solid var(--bd);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: rgba(255, 255, 255, .88)
}

.upload-text {
    font-size: .88rem;
    color: var(--muted2);
    margin-bottom: 3px
}

.upload-hint {
    font-size: .7rem;
    color: var(--muted)
}

.analytics-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0
}

.analytics-inline-file {
    font-family: Lora, serif;
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.analytics-inline-stat {
    font-family: Lora, serif;
    font-size: 13px;
    color: rgba(255, 255, 255, .85)
}

.analytics-inline-gold {
    font-family: Lora, serif;
    font-size: 13px;
    color: rgba(201, 168, 76, .75)
}

.analytics-dot {
    color: rgba(201, 168, 76, .3)
}

.file-ok {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    margin-top: 10px;
    background: rgba(201, 168, 76, .06);
    border: 1px solid var(--bd);
    font-size: .78rem;
    color: var(--muted2)
}

.file-ok.show {
    display: flex
}

.file-ok svg {
    color: rgba(255, 255, 255, .88);
    flex-shrink: 0
}

.preview-box {
    display: none;
    margin-top: 10px;
    padding: 11px 13px;
    background: rgba(4, 4, 4, .45);
    border: 1px solid rgba(201, 168, 76, .1);
    font-size: .72rem;
    color: var(--muted);
    line-height: 1.8
}

.preview-box.show {
    display: block
}

.preview-box strong {
    color: var(--gold2)
}

.logo-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px
}

.logo-mode-btn {
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    background: rgba(4, 4, 4, .45)
}

.logo-mode-btn.active {
    border-color: rgba(180, 180, 180, .7)
}

.logo-mode-btn svg {
    display: block;
    margin: 0 auto 5px;
    color: var(--muted)
}

.logo-mode-btn.active svg {
    color: #bbb
}

.logo-mode-btn span {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted)
}

.logo-mode-btn.active span {
    color: #bbb
}

.logo-upload-zone {
    border: 1px dashed var(--gold-bd);
    padding: 16px;
    cursor: pointer;
    transition: all .25s;
    background: rgba(4, 4, 4, .45);
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px
}

.logo-upload-zone:hover {
    border-color: rgba(255, 255, 255, .3);
    background: rgba(201, 168, 76, .04)
}

.logo-upload-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%
}

.logo-preview-wrap {
    width: 56px;
    height: 56px;
    border: 1px solid var(--bd);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(4, 4, 4, .5);
    overflow: hidden
}

.logo-preview-wrap svg {
    animation: logoIconPulse 5s ease-in-out infinite
}

@keyframes logoIconPulse {

    0%,
    100% {
        opacity: .5
    }

    50% {
        opacity: 1
    }
}

.logo-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.logo-upload-text p {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 2px;
    font-family: Lora, serif
}

.logo-upload-text span {
    font-size: 9px;
    color: var(--muted);
    font-family: Lora, serif
}

.logo-info-box {
    padding: 12px 14px;
    background: rgba(4, 4, 4, .45);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: .82rem
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 4px
}

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

.field-label {
    font-family: Syncopate, sans-serif;
    font-size: .43rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted)
}

.field-input {
    background: rgba(10, 10, 10, .6);
    border: 1px solid rgba(201, 168, 76, .15);
    padding: 9px 11px;
    font-family: Lora, serif;
    font-size: .84rem;
    color: #fff;
    transition: border-color .2s;
    width: 100%
}

.field-input:focus {
    outline: 0;
    border-color: rgba(255, 255, 255, .3)
}

.field-input::placeholder {
    color: var(--muted)
}

.toggle-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.toggle-label {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 12px
}

.toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .04);
    border-left: 2px solid transparent;
    transition: all .2s
}

.toggle-item:has(input:checked) {
    border-left-color: rgba(201, 168, 76, .6);
    background: rgba(255, 255, 255, .04);
    border-top-color: rgba(255, 255, 255, .06);
    border-right-color: rgba(255, 255, 255, .06);
    border-bottom-color: rgba(255, 255, 255, .06)
}

.toggle-name {
    font-family: Lora, serif;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    transition: color .2s
}

.toggle-item:has(input:checked) .toggle-name {
    color: rgba(255, 255, 255, .75)
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, .06);
    border-radius: 9px;
    transition: all .25s
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, .25);
    border-radius: 50%;
    transition: all .25s
}

.toggle-switch input:checked+.toggle-slider {
    background: rgba(201, 168, 76, .2)
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(14px);
    background: rgba(201, 168, 76, .75)
}

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

.preview-section {
    display: none;
    margin-bottom: 3px
}

.preview-section.show {
    display: block
}

.invoice-preview {
    width: 100%;
    font-family: helvetica, arial, sans-serif;
    font-size: 11px;
    overflow: hidden
}

.btn-row {
    display: flex;
    gap: 10px
}

.preview-btn {
    flex: 1;
    padding: 14px;
    background: 0 0;
    border: 1px solid var(--bd);
    color: rgba(255, 255, 255, .88);
    cursor: pointer;
    font-family: Syncopate, sans-serif;
    font-size: .46rem;
    letter-spacing: .16em;
    font-weight: 700;
    text-transform: uppercase;
    transition: all .25s
}

.preview-btn:hover {
    background: rgba(201, 168, 76, .08)
}

.gen-btn {
    flex: 1;
    padding: 15px;
    background: linear-gradient(135deg, var(--gold), #8a6018);
    color: var(--black);
    border: none;
    cursor: pointer;
    font-family: Syncopate, sans-serif;
    font-size: .48rem;
    letter-spacing: .16em;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .3s
}

.gen-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold2), var(--gold));
    box-shadow: 0 10px 28px rgba(201, 168, 76, .25)
}

.gen-btn:disabled {
    opacity: .35;
    cursor: not-allowed
}

@keyframes goldSweep {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.progress {
    display: none;
    margin-bottom: 10px
}

.progress.show {
    display: block
}

.prog-bg {
    height: 3px;
    background: rgba(201, 168, 76, .1);
    margin-bottom: 7px
}

.prog-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold2));
    transition: width .25s
}

.prog-text {
    font-family: Syncopate, sans-serif;
    font-size: .42rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center
}

.success {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 13px;
    margin-bottom: 12px;
    background: rgba(201, 168, 76, .06);
    border: 1px solid var(--bd);
    font-size: .8rem;
    color: var(--gold2)
}

.success.show {
    display: flex
}

.error-msg {
    display: none;
    padding: 10px 13px;
    margin-bottom: 10px;
    background: rgba(180, 60, 30, .1);
    border: 1px solid rgba(180, 60, 30, .3);
    font-size: .76rem;
    color: #e08060
}

.error-msg.show {
    display: block
}

.reset-btn {
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .5);
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s
}

.reset-btn:hover {
    border-color: rgba(255, 255, 255, .4);
    color: rgba(255, 255, 255, .8)
}

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px
}

.privacy-note svg {
    flex-shrink: 0;
    margin-top: 1px
}

.privacy-note span {
    font-size: .7rem;
    color: rgba(255, 255, 255, .3);
    line-height: 1.5
}

.saved-badge {
    font-family: 'DM Sans', sans-serif;
    font-size: .65rem;
    letter-spacing: .04em;
    text-transform: none;
    color: rgba(255, 255, 255, .88);
    background: rgba(201, 168, 76, .1);
    border: 1px solid var(--bd);
    padding: 2px 8px;
    opacity: 0;
    transition: opacity .3s;
    font-weight: 400
}

.saved-badge.show {
    opacity: 1
}

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

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

    .field.full {
        grid-column: 1
    }

    .btn-row {
        flex-direction: column
    }

    .analytics-inline {
        flex-wrap: wrap
    }

    .hero-logo {
        width: 100px !important;
        height: 100px !important
    }

    .hero-brand {
        margin-bottom: 10px
    }

    .hero-nav {
        flex-direction: column;
        gap: 6px;
        width: 100%
    }

    .hero-tab {
        width: 100%;
        justify-content: center;
        padding: 11px 20px;
        font-size: .34rem
    }

    .app-hero {
        margin-bottom: 8px
    }

    .step-header {
        padding: 14px 16px;
        gap: 12px
    }

    .step-num {
        font-size: 1.4rem;
        min-width: 28px
    }

    .step-body {
        padding: 0 16px 0 16px !important
    }

    .step-open .step-body {
        padding: 0 16px 20px 16px !important
    }

    .step-title {
        font-size: .32rem;
        letter-spacing: .16em
    }

    .step-summary {
        font-size: .64rem
    }

    .step-tag {
        font-size: .2rem
    }

    .upload-icon-circle {
        width: 48px;
        height: 48px
    }

    .upload-text {
        font-size: .82rem
    }

    .entry-mode-toggle {
        flex-direction: column
    }

    .entry-mode-btn {
        width: 100%;
        justify-content: center
    }

    .logo-mode-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px
    }

    .logo-mode-btn {
        padding: 12px 6px
    }

    .logo-mode-btn svg {
        width: 16px;
        height: 16px
    }

    .logo-mode-btn span {
        font-size: 7px
    }

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

    .toggle-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px
    }

    .toggle-item {
        padding: 8px 10px
    }

    .toggle-name {
        font-size: 11px
    }

    .toggle-label {
        font-size: .32rem
    }

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

    .btn-row {
        flex-direction: column
    }

    .panel-label {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important
    }

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

    #appWrapper {
        padding: 0 12px
    }

    .card {
        padding: 0
    }

    .login-card {
        margin: 0 16px;
        padding: 36px 24px
    }

    .login-logo {
        width: 140px
    }

    .login-input {
        font-size: .88rem;
        padding: 12px 14px
    }

    .login-btn {
        padding: 14px;
        font-size: .34rem
    }

    .login-link {
        font-size: .4rem
    }
}

.preview-nav {
    display: flex;
    align-items: center;
    gap: 6px
}

.preview-nav-btn {
    background: 0 0;
    border: none;
    color: rgba(201, 168, 76, .6);
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    padding: 0
}

.preview-nav-btn:hover:not(:disabled) {
    color: #c9a84c
}

.preview-nav-btn:disabled {
    opacity: .2;
    cursor: not-allowed
}

.preview-nav-count {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .14em;
    color: var(--muted);
    min-width: 38px;
    text-align: center
}

.preview-dl-btn {
    background: 0 0;
    border: 1px solid var(--bd);
    color: rgba(255, 255, 255, .88);
    padding: 4px 10px;
    cursor: pointer;
    font-family: Syncopate, sans-serif;
    font-size: .36rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .2s;
    margin-left: 4px
}

.preview-dl-btn:hover {
    background: rgba(201, 168, 76, .1);
    border-color: rgba(255, 255, 255, .3)
}

.layout-card[title] {
    position: relative
}

.layout-card[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid var(--bd);
    color: rgba(255, 255, 255, .75);
    font-family: 'DM Sans', sans-serif;
    font-size: .72rem;
    padding: 6px 10px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none
}

.layout-card[title]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gold-bd);
    z-index: 10;
    pointer-events: none
}

@keyframes stepBgSweep {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.step-panel {
    background: rgba(4, 4, 4, .72);
    border: 1px solid var(--bd);
    margin-bottom: 2px;
    position: relative;
    overflow: hidden;
    transition: border-color .35s ease, background .35s ease
}

.step-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent)
}

.step-panel.step-active {
    border-color: rgba(201, 168, 76, .2);
    background: linear-gradient(135deg, #0e0a02 0, #181103 25%, rgba(201, 168, 76, .06) 45%, #120d02 65%, #0c0901 85%, #140f02 100%);
    background-size: 300% 300%;
    animation: stepBgSweep 16s ease infinite
}

.step-panel.step-active::after {
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .25), transparent)
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none
}

.step-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .15);
    line-height: 1;
    min-width: 36px;
    flex-shrink: 0;
    transition: color .25s
}

.step-active .step-num {
    background: linear-gradient(90deg, #8a6018, #c9a84c, #e8c96a, #fff, #e8c96a, #c9a84c, #8a6018);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: tabGradient 5s ease infinite
}

.step-header-text {
    flex: 1;
    min-width: 0
}

.step-title {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    transition: color .25s
}

.step-active .step-title {
    color: rgba(255, 255, 255, .85)
}

.step-summary {
    font-family: Lora, serif;
    font-size: .72rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .45);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.step-open .step-summary {
    display: none
}

.step-tag {
    font-family: Syncopate, sans-serif;
    font-size: .22rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid rgba(201, 168, 76, .15);
    color: rgba(201, 168, 76, .45);
    background: rgba(201, 168, 76, .04);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .3s
}

.step-tag-required,
.step-tag.show {
    opacity: 1
}

.step-chevron {
    color: rgba(255, 255, 255, .4);
    transition: transform .3s ease;
    flex-shrink: 0
}

.step-open .step-chevron {
    transform: rotate(180deg);
    color: rgba(201, 168, 76, .5)
}

.step-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .45s ease, opacity .3s ease;
    padding: 0 24px 0 24px
}

.step-open .step-body {
    max-height: 3000px;
    opacity: 1;
    padding: 0 24px 24px 24px;
    transition: max-height .5s ease, opacity .35s ease
}

@keyframes panelGlow {
    0% {
        box-shadow: 0 0 0 rgba(201, 168, 76, 0)
    }

    100% {
        box-shadow: 0 0 18px rgba(201, 168, 76, .12)
    }
}

.panel-collapsible {
    transition: border-color .35s ease, background .35s ease, box-shadow .35s ease
}

@keyframes panelActiveGlow {
    0% {
        box-shadow: 0 0 0 1px rgba(201, 168, 76, .15), 0 0 18px rgba(201, 168, 76, .08), inset 0 0 30px rgba(201, 168, 76, .03);
        border-color: rgba(201, 168, 76, .45)
    }

    50% {
        box-shadow: 0 0 0 1px rgba(201, 168, 76, .35), 0 0 40px rgba(201, 168, 76, .18), 0 0 80px rgba(201, 168, 76, .07), inset 0 0 60px rgba(201, 168, 76, .06);
        border-color: rgba(201, 168, 76, .85)
    }

    100% {
        box-shadow: 0 0 0 1px rgba(201, 168, 76, .15), 0 0 18px rgba(201, 168, 76, .08), inset 0 0 30px rgba(201, 168, 76, .03);
        border-color: rgba(201, 168, 76, .45)
    }
}

@keyframes panelActiveBg {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.panel-collapsible.panel-active {
    border-color: rgba(201, 168, 76, .65);
    background: linear-gradient(135deg, #140e02 0, #281c04 20%, rgba(201, 168, 76, .08) 40%, #1e1402 60%, #0f0a01 80%, #231803 100%);
    background-size: 300% 300%;
    animation: panelActiveGlow 3s ease-in-out infinite, panelActiveBg 6s ease infinite
}

.panel-collapsible.panel-active::after {
    background: linear-gradient(90deg, transparent, rgba(232, 201, 106, .9), rgba(201, 168, 76, .6), rgba(232, 201, 106, .9), transparent);
    height: 1px
}

.panel-collapsible.panel-active .panel-label {
    color: var(--gold2)
}

.panel-collapsible.panel-active .panel-label .toggle-title::before {
    background: linear-gradient(90deg, var(--gold), var(--gold2));
    width: 28px
}

.panel-collapsible {
    transition: border-color .35s ease, background .35s ease, box-shadow .35s ease
}

.panel-collapsible:not(.panel-active) {
    background: rgba(4, 4, 4, .5);
    border-color: var(--bd);
    box-shadow: none
}

.panel-collapsible:not(.panel-active)::after {
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .12), transparent)
}

.panel-toggle {
    cursor: pointer;
    user-select: none;
    justify-content: space-between !important
}

.panel-toggle::before {
    display: none
}

.panel-toggle .toggle-title {
    display: flex;
    align-items: center;
    gap: 10px
}

.panel-toggle .toggle-title::before {
    content: '';
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, .25);
    flex-shrink: 0
}

.panel-chevron {
    color: rgba(255, 255, 255, .88);
    transition: transform .3s ease;
    flex-shrink: 0;
    opacity: .6
}

.panel-open .panel-chevron {
    transform: rotate(180deg);
    opacity: 1
}

.panel-collapse {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease
}

.panel-open .panel-collapse {
    max-height: 3000px;
    opacity: 1;
    transition: max-height .5s ease, opacity .3s ease
}

.panel-collapsible:not(.panel-open) .panel-label {
    margin-bottom: 0
}

.entry-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--bd)
}

.entry-mode-btn {
    flex: 1;
    padding: 9px 12px;
    background: 0 0;
    border: none;
    color: var(--muted);
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all .2s
}

.entry-mode-btn:first-child {
    border-right: 1px solid var(--gold-bd)
}

.entry-mode-btn.active {
    background: rgba(201, 168, 76, .08);
    color: rgba(255, 255, 255, .88)
}

.entry-mode-btn:hover:not(.active) {
    color: rgba(255, 255, 255, .6)
}

.manual-table-wrap {
    overflow-x: auto;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch
}

.manual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
    min-width: 900px
}

.manual-table thead tr {
    background: rgba(201, 168, 76, .06);
    border-bottom: 1px solid var(--gold-bd)
}

.manual-table th {
    font-family: Syncopate, sans-serif;
    font-size: .32rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 8px;
    text-align: left;
    white-space: nowrap
}

.manual-table td {
    padding: 4px 4px;
    border-bottom: 1px solid rgba(201, 168, 76, .06)
}

.manual-table input[type=number],
.manual-table input[type=text] {
    width: 100%;
    background: 0 0;
    border: none;
    border-bottom: 1px solid rgba(201, 168, 76, .12);
    padding: 5px 4px;
    font-family: Lora, serif;
    font-size: .78rem;
    color: #fff;
    min-width: 60px
}

.manual-table input[type=number]:focus,
.manual-table input[type=text]:focus {
    outline: 0;
    border-bottom-color: rgba(255, 255, 255, .88)
}

.manual-table input::placeholder {
    color: rgba(255, 255, 255, .18)
}

.manual-del-btn {
    background: 0 0;
    border: none;
    color: rgba(255, 255, 255, .2);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 14px;
    line-height: 1;
    transition: color .2s
}

.manual-del-btn:hover {
    color: rgba(200, 80, 60, .8)
}

.manual-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px
}

.manual-add-btn {
    background: 0 0;
    border: 1px solid var(--bd);
    color: rgba(255, 255, 255, .88);
    padding: 6px 14px;
    font-family: Syncopate, sans-serif;
    font-size: .36rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s
}

.manual-add-btn:hover {
    background: rgba(201, 168, 76, .08)
}

.manual-count {
    font-family: Syncopate, sans-serif;
    font-size: .34rem;
    letter-spacing: .12em;
    color: var(--muted)
}

.mapper-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 2, 2, .88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.mapper-modal {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(8, 8, 8, .88);
    border: 1px solid rgba(201, 168, 76, .35);
    position: relative;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, .1), 0 0 60px rgba(201, 168, 76, .12), 0 24px 60px rgba(0, 0, 0, .7);
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.2) transparent
}

.mapper-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .6), transparent)
}

.mapper-modal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .25), transparent)
}

.mapper-header {
    padding: 28px 28px 0
}

.mapper-title {
    font-family: Syncopate, sans-serif;
    font-size: .52rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px
}

.mapper-title-line {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, .2);
    flex-shrink: 0
}

.mapper-subtitle {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-left: 30px
}

.mapper-preview-wrap {
    padding: 0 28px 16px
}

.mapper-preview-label {
    font-family: Syncopate, sans-serif;
    font-size: .34rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .25);
    margin-bottom: 8px
}

.mapper-preview-headers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px
}

.mapper-preview-cell {
    background: rgba(4, 4, 4, .45);
    border: 1px solid rgba(255, 255, 255, .07);
    padding: 3px 8px;
    font-size: .68rem;
    color: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap
}

.mapper-preview-idx {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    color: rgba(201, 168, 76, .4);
    letter-spacing: .06em
}

.mapper-grid {
    padding: 0 28px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px
}

.mapper-row {
    display: grid;
    grid-template-columns: 148px 1fr 96px;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(201, 168, 76, .06)
}

.mapper-row:last-child {
    border-bottom: none
}

.mapper-field-label {
    font-family: Syncopate, sans-serif;
    font-size: .36rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted2);
    white-space: nowrap
}

.mapper-select {
    font-size: .78rem;
    padding: 7px 10px;
    cursor: pointer;
    background: rgba(4, 4, 4, .45);
    color: #fff;
    border: 1px solid rgba(201, 168, 76, .15);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(201,168,76,0.5)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px
}

.mapper-select:focus {
    outline: 0;
    border-color: rgba(255, 255, 255, .3)
}

.mapper-conf-badge {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 7px;
    white-space: nowrap;
    text-align: center
}

.conf-high {
    background: rgba(80, 160, 80, .1);
    border: 1px solid rgba(80, 160, 80, .25);
    color: rgba(130, 200, 130, .85)
}

.conf-mid {
    background: rgba(201, 168, 76, .08);
    border: 1px solid rgba(201, 168, 76, .25);
    color: rgba(201, 168, 76, .75)
}

.conf-low {
    background: rgba(180, 60, 30, .08);
    border: 1px solid rgba(180, 60, 30, .25);
    color: rgba(210, 110, 80, .85)
}

.mapper-btn-row {
    display: flex;
    gap: 10px;
    padding: 20px 28px 28px
}

.mapper-btn-row .preview-btn {
    flex: 1
}

.mapper-btn-row .gen-btn {
    flex: 1
}

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

    .mapper-conf-badge {
        width: fit-content
    }

    .mapper-modal {
        max-height: 95vh
    }

    .mapper-btn-row,
    .mapper-grid,
    .mapper-header,
    .mapper-preview-wrap {
        padding-left: 18px;
        padding-right: 18px
    }
}

@keyframes dashShimmer {
    0% {
        background-position: -200% 0
    }

    100% {
        background-position: 200% 0
    }
}

.dash-skel {
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(201, 168, 76, .04) 25%, rgba(201, 168, 76, .1) 50%, rgba(201, 168, 76, .04) 75%);
    background-size: 200% 100%;
    animation: dashShimmer 1.8s ease infinite
}

.dash-skel-hero-val {
    height: 44px;
    width: 320px;
    margin: 0 auto 10px
}

.dash-skel-kpi-val {
    height: 22px;
    width: 60px;
    margin-bottom: 4px
}

.dash-skel-kpi-sub {
    height: 10px;
    width: 70px
}

@keyframes dashFadeDown {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes dashFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes dashFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-8px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes dashGrowUp {
    from {
        transform: scaleY(0)
    }

    to {
        transform: scaleY(1)
    }
}

@keyframes dashHeroGradient {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.dash-hero {
    position: relative;
    padding: 40px 32px 28px;
    background: linear-gradient(160deg, rgba(18, 13, 2, .95) 0, rgba(6, 5, 0, .98) 50%, rgba(14, 10, 1, .95) 100%);
    border: 1px solid rgba(201, 168, 76, .15);
    overflow: hidden;
    margin-bottom: 8px;
    text-align: center
}

.dash-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 100% at 50% 0, rgba(201, 168, 76, .06) 0, transparent 70%);
    pointer-events: none
}

.dash-hero-eyebrow {
    font-family: Syncopate, sans-serif;
    font-size: .62rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .6);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: dashFadeDown .5s ease .1s forwards
}

.dash-hero-value {
    font-family: Lora, serif;
    font-size: 3.4rem;
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, #4a3510, #5a4010, #8a6018, #a88a3c, #c9a84c, #a88a3c, #8a6018, #5a4010, #4a3510);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: dashHeroGradient 16s ease infinite
}

.dash-hero-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 500;
    padding: 3px 10px;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    opacity: 0;
    animation: dashFadeDown .4s ease .35s forwards
}

.dash-hero-change-up {
    color: rgba(140, 200, 100, .85);
    background: rgba(140, 200, 100, .06)
}

.dash-hero-change-down {
    color: rgba(220, 100, 80, .85);
    background: rgba(220, 100, 80, .06)
}

.dash-hero-change svg {
    flex-shrink: 0
}

.dash-hero-meta {
    font-family: Lora, serif;
    font-size: .78rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .4);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    animation: dashFadeDown .5s ease .4s forwards
}

.dash-hero-sep {
    color: rgba(201, 168, 76, .4)
}

.dash-hero-bar-wrap {
    margin-top: 18px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: dashFadeIn .5s ease .6s forwards;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto
}

.dash-hero-bar-bg {
    height: 2px;
    background: rgba(201, 168, 76, .08);
    border-radius: 1px;
    overflow: hidden
}

@keyframes dashBarSweep {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

.dash-hero-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #5a4010, #8a6018, #c9a84c, #e8c96a, #c9a84c, #8a6018, #5a4010);
    background-size: 300% 100%;
    border-radius: 1px;
    box-shadow: 0 0 12px rgba(201, 168, 76, .3);
    animation: dashBarSweep 14s ease infinite
}

.dash-hero-bar-label {
    margin-top: 6px;
    font-size: .62rem;
    color: rgba(255, 255, 255, .28)
}

.dash-hero-last {
    margin-top: 10px;
    font-size: .6rem;
    color: rgba(255, 255, 255, .2);
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: dashFadeIn .4s ease .7s forwards
}

.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 8px
}

.dash-kpi {
    background: rgba(4, 4, 4, .72);
    border: 1px solid var(--bd);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, background .3s, transform .25s, box-shadow .3s;
    cursor: default;
    opacity: 0;
    animation: dashFadeDown .4s ease forwards
}

.dash-kpi:first-child {
    animation-delay: .15s
}

.dash-kpi:nth-child(2) {
    animation-delay: .2s
}

.dash-kpi:nth-child(3) {
    animation-delay: .25s
}

.dash-kpi:nth-child(4) {
    animation-delay: .3s
}

.dash-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0), transparent);
    transition: background .3s
}

.dash-kpi:hover {
    border-color: rgba(201, 168, 76, .2);
    background: rgba(10, 8, 1, .85);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 20px rgba(201, 168, 76, .06)
}

.dash-kpi:hover::before {
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .5), transparent)
}

.dash-kpi:hover .dash-kpi-val {
    color: #fff
}

.dash-kpi-label {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .65);
    margin-bottom: 8px
}

.dash-kpi-val {
    font-family: Lora, serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .9);
    letter-spacing: -.02em;
    line-height: 1;
    margin-bottom: 4px;
    transition: color .25s
}

.dash-kpi-sub {
    font-size: .65rem;
    color: rgba(255, 255, 255, .35)
}

.dash-section {
    background: rgba(4, 4, 4, .72);
    border: 1px solid var(--bd);
    padding: 22px 24px;
    margin-bottom: 8px;
    position: relative
}

.dash-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent)
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px
}

.dash-section-title {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    display: flex;
    align-items: center;
    gap: 10px
}

.dash-section-title::before {
    content: '';
    width: 16px;
    height: 1px;
    background: rgba(201, 168, 76, .4)
}

.dash-section-meta {
    font-size: .65rem;
    color: rgba(255, 255, 255, .28)
}

.dash-chart-area {
    position: relative;
    height: 180px;
    display: flex;
    gap: 6px
}

.dash-chart-empty {
    padding: 16px 0 8px
}

.dash-y-axis {
    width: 40px;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, .04);
    flex-shrink: 0
}

.dash-y-tick {
    position: absolute;
    right: 6px;
    font-size: .56rem;
    color: rgba(255, 255, 255, .22);
    transform: translateY(50%)
}

.dash-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    position: relative
}

.dash-bars::after,
.dash-bars::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, .03);
    pointer-events: none
}

.dash-bars::before {
    bottom: 50%
}

.dash-bars::after {
    bottom: 25%
}

.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end
}

.dash-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    cursor: default;
    position: relative;
    transform-origin: bottom;
    transform: scaleY(0);
    background: linear-gradient(180deg, rgba(201, 168, 76, .35) 0, rgba(201, 168, 76, .12) 100%);
    transition: background .2s
}

.dash-bar:hover {
    background: linear-gradient(180deg, rgba(232, 201, 106, .7) 0, rgba(201, 168, 76, .3) 100%)
}

.dash-bar.dash-bar-anim {
    animation: dashGrowUp .7s cubic-bezier(.34, 1.4, .64, 1) forwards
}

.dash-bar:hover .dash-bar-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

.dash-bar-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(8, 6, 0, .97);
    border: 1px solid rgba(201, 168, 76, .3);
    padding: 10px 14px;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .6);
    opacity: 0;
    transition: opacity .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 3px
}

.dash-tt-month {
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .92)
}

.dash-tt-row {
    font-size: .74rem;
    color: rgba(255, 255, 255, .6)
}

.dash-tt-gold {
    font-family: Lora, serif;
    color: rgba(201, 168, 76, .75);
    font-weight: 400;
    font-size: .82rem
}

.dash-x-labels {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding-left: 46px
}

.dash-x-label {
    flex: 1;
    text-align: center;
    font-size: .58rem;
    color: rgba(255, 255, 255, .25)
}

.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px
}

.dash-heatmap-grid {
    display: flex;
    gap: 3px;
    justify-content: space-between
}

.dash-heat-week {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1
}

.dash-heat-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    opacity: 0;
    transition: transform .15s
}

.dash-heat-cell.dash-heat-anim {
    animation: dashFadeIn .25s ease forwards
}

.dash-heat-cell:not(.dash-h0):hover {
    transform: scale(1.4)
}

.dash-h0 {
    background: rgba(255, 255, 255, .03)
}

.dash-h1 {
    background: rgba(201, 168, 76, .15)
}

.dash-h2 {
    background: rgba(201, 168, 76, .3)
}

.dash-h3 {
    background: rgba(201, 168, 76, .5)
}

.dash-h4 {
    background: rgba(232, 201, 106, .75)
}

.dash-heat-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    justify-content: flex-end
}

.dash-heat-legend-label {
    font-size: .56rem;
    color: rgba(255, 255, 255, .25)
}

.dash-lb-wrap {
    max-height: 210px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.15) transparent
}

.dash-lb-wrap::-webkit-scrollbar {
    width: 3px
}

.dash-lb-wrap::-webkit-scrollbar-track {
    background: 0 0
}

.dash-lb-wrap::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, .2);
    border-radius: 2px
}

.dash-lb-row {
    position: relative;
    height: 34px;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    transition: all .2s;
    cursor: default;
    opacity: 0
}

.dash-lb-row.dash-lb-anim {
    animation: dashFadeLeft .4s ease forwards
}

.dash-lb-row:hover {
    transform: translateX(4px)
}

.dash-lb-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 2px
}

.dash-lb-rank {
    position: relative;
    z-index: 1;
    font-family: Lora, serif;
    font-size: .34rem;
    color: rgba(201, 168, 76, .5);
    padding: 0 10px;
    width: 28px;
    flex-shrink: 0
}

.dash-lb-name {
    position: relative;
    z-index: 1;
    font-size: .8rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.dash-lb-val {
    position: relative;
    z-index: 1;
    font-family: Lora, serif;
    font-size: .82rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .75);
    padding-right: 10px;
    flex-shrink: 0
}

.dash-dist-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 90px
}

.dash-dist-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative
}

.dash-dist-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transform-origin: bottom;
    transform: scaleY(0);
    transition: background .2s;
    position: relative;
    cursor: default
}

.dash-dist-bar.dash-dist-anim {
    animation: dashGrowUp .6s cubic-bezier(.34, 1.4, .64, 1) forwards
}

.dash-dist-active {
    background: linear-gradient(180deg, rgba(232, 201, 106, .6) 0, rgba(201, 168, 76, .25) 100%)
}

.dash-dist-active:hover {
    background: linear-gradient(180deg, rgba(255, 235, 140, .8) 0, rgba(201, 168, 76, .4) 100%)
}

.dash-dist-active:hover .dash-dist-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

.dash-dist-empty {
    background: rgba(255, 255, 255, .03)
}

.dash-dist-count {
    font-size: .58rem;
    color: rgba(255, 255, 255, .55);
    margin-top: 2px;
    opacity: 0
}

.dash-dist-count.dash-dist-count-anim {
    animation: dashFadeIn .3s ease forwards
}

.dash-dist-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(8, 6, 0, .97);
    border: 1px solid rgba(201, 168, 76, .3);
    padding: 8px 12px;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
    opacity: 0;
    transition: opacity .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 2px
}

.dash-dist-labels {
    display: flex;
    gap: 4px;
    margin-top: 6px
}

.dash-dist-label {
    flex: 1;
    text-align: center;
    font-size: .5rem;
    color: rgba(255, 255, 255, .22)
}

.dash-hist-controls {
    display: flex;
    align-items: center;
    gap: 6px
}

.dash-sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: 0 0;
    border: 1px solid rgba(201, 168, 76, .4);
    color: rgba(201, 168, 76, .75);
    font-family: Syncopate, sans-serif;
    font-size: .26rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 6px 12px;
    cursor: pointer;
    transition: all .25s;
    background: rgba(201, 168, 76, .06);
    box-shadow: 0 0 12px rgba(201, 168, 76, .1), inset 0 0 8px rgba(201, 168, 76, .04)
}

.dash-sort-btn:hover {
    border-color: rgba(201, 168, 76, .5);
    color: rgba(201, 168, 76, .85)
}

.dash-sort-sel {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    cursor: pointer
}

.dash-sort-wrap {
    position: relative;
    display: flex;
    align-items: center
}

.dash-clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .2);
    font-family: Syncopate, sans-serif;
    font-size: .26rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 6px 12px;
    cursor: pointer;
    transition: all .25s
}

.dash-clear-btn:hover {
    border-color: rgba(180, 60, 30, .4);
    color: rgba(200, 80, 60, .6)
}

.dash-run-list {
    display: flex;
    flex-direction: column;
    gap: 0
}

.dash-rc {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: all .2s;
    opacity: 0;
    position: relative;
    border-left: 2px solid transparent
}

.dash-rc.dash-rc-anim {
    animation: dashFadeLeft .35s ease forwards
}

.dash-rc:last-child {
    border-bottom: none
}

.dash-rc:hover:not(.dash-rc-open) {
    background: rgba(201, 168, 76, .015)
}

.dash-rc.dash-rc-open {
    border-left-color: rgba(201, 168, 76, .6);
    padding-left: 14px;
    background: rgba(201, 168, 76, .03)
}

.dash-rc.dash-rc-open .dash-rc-date {
    color: rgba(255, 255, 255, .9)
}

.dash-rc.dash-rc-open .dash-rc-chevron {
    transform: rotate(180deg);
    color: rgba(201, 168, 76, .5)
}

.dash-rc-left {
    min-width: 105px;
    flex-shrink: 0
}

.dash-rc-date {
    font-family: Lora, serif;
    font-size: .8rem;
    color: rgba(255, 255, 255, .8);
    font-weight: 400
}

.dash-rc-time {
    font-size: .65rem;
    color: rgba(255, 255, 255, .3);
    margin-top: 1px
}

.dash-rc-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 14px
}

.dash-rc-badge {
    font-family: Syncopate, sans-serif;
    font-size: .24rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0
}

.dash-rc-layout {
    font-size: .68rem;
    color: rgba(255, 255, 255, .22);
    white-space: nowrap
}

.dash-rc-contractors {
    font-size: .62rem;
    color: rgba(255, 255, 255, .2);
    white-space: nowrap
}

.dash-rc-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px
}

.dash-rc-val {
    font-family: Lora, serif;
    font-size: .94rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .75);
    white-space: nowrap
}

.dash-rc-avg {
    font-family: Lora, serif;
    font-size: .62rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .25);
    white-space: nowrap
}

.dash-rc-chevron {
    color: rgba(255, 255, 255, .15);
    flex-shrink: 0;
    transition: transform .3s ease, color .2s;
    margin-left: 8px
}

.dash-rc-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4, 0, .2, 1)
}

.dash-rc-drawer-inner {
    padding: 0 0 12px;
    border-top: 1px solid rgba(201, 168, 76, .08);
    margin-top: 8px
}

.dash-drawer-names {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 0 0
}

.dash-drawer-name {
    font-size: .7rem;
    color: rgba(255, 255, 255, .5);
    background: rgba(201, 168, 76, .04);
    border: 1px solid rgba(201, 168, 76, .12);
    padding: 3px 10px
}

.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    gap: 10px
}

.dash-empty-svg {
    opacity: .15
}

.dash-empty-title {
    font-family: Syncopate, sans-serif;
    font-size: .34rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3)
}

.dash-empty-body {
    font-size: .72rem;
    color: rgba(255, 255, 255, .18);
    text-align: center;
    max-width: 280px;
    line-height: 1.5
}

@media(max-width:560px) {
    .dash-hero {
        padding: 28px 20px 22px
    }

    .dash-hero-value {
        font-size: 2rem
    }

    .dash-hero-eyebrow {
        font-size: .42rem;
        letter-spacing: .2em
    }

    .dash-hero-meta {
        font-size: .68rem;
        gap: 10px
    }

    .dash-hero-bar-wrap {
        max-width: 100%
    }

    .dash-hero-change {
        font-size: .64rem
    }

    .dash-kpi-row {
        grid-template-columns: repeat(2, 1fr)
    }

    .dash-kpi {
        padding: 12px 14px
    }

    .dash-kpi-label {
        font-size: .32rem
    }

    .dash-kpi-val {
        font-size: 1.2rem
    }

    .dash-section {
        padding: 16px 16px
    }

    .dash-section-title {
        font-size: .32rem
    }

    .dash-two-col {
        grid-template-columns: 1fr
    }

    .dash-chart-area {
        height: 120px
    }

    .dash-lb-row {
        height: 30px
    }

    .dash-lb-name {
        font-size: .72rem
    }

    .dash-lb-val {
        font-size: .72rem
    }

    .dash-lb-rank {
        font-size: .3rem
    }

    .dash-rc-avg,
    .dash-rc-contractors,
    .dash-rc-layout {
        display: none
    }

    .dash-rc-center {
        padding: 0 8px
    }

    .dash-rc-left {
        min-width: 80px
    }

    .dash-rc-date {
        font-size: .72rem
    }

    .dash-rc-val {
        font-size: .82rem
    }

    .dash-rc.dash-rc-open {
        padding-left: 10px
    }

    .dash-hist-controls {
        flex-wrap: wrap
    }

    .dash-sort-btn {
        font-size: .24rem;
        padding: 5px 10px
    }

    .dash-clear-btn {
        font-size: .24rem;
        padding: 5px 10px
    }

    .dash-dist-label {
        font-size: .42rem
    }
}

.audit-top-section {
    margin-bottom: 0;
    border-bottom: none
}

.audit-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between
}

.audit-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: .76rem;
    color: rgba(255, 255, 255, .25);
    margin-top: 3px
}

.audit-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0
}

.audit-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .35);
    font-family: Syncopate, sans-serif;
    font-size: .26rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 6px 12px;
    cursor: pointer;
    transition: all .2s;
    position: relative
}

.audit-action-btn:hover {
    border-color: rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .6)
}

.audit-action-primary {
    background: rgba(201, 168, 76, .1);
    border-color: rgba(201, 168, 76, .55);
    color: rgba(201, 168, 76, 1)
}

.audit-action-primary:hover {
    background: rgba(201, 168, 76, .18);
    border-color: rgba(201, 168, 76, .75);
    color: rgba(255, 215, 130, 1)
}

.audit-action-ghost {
    color: rgba(255, 255, 255, .3);
    border-color: rgba(255, 255, 255, .05);
}

.audit-action-ghost:hover {
    color: rgba(255, 255, 255, .55);
    border-color: rgba(255, 255, 255, .15);
}

.audit-filter-sep {
    color: rgba(201, 168, 76, .35);
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    padding: 0 4px;
    align-self: flex-end;
    padding-bottom: 10px;
    user-select: none;
}

.audit-filter-dot {
    display: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    position: absolute;
    top: 4px;
    right: 4px
}

.audit-filter-dot.active {
    display: block
}

.audit-filter-bar {
    transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
    border-top: 1px solid transparent
}

.audit-filter-bar.open {
    max-height: 120px !important;
    border-top-color: rgba(255, 255, 255, .04);
    margin-top: 16px
}

.audit-filter-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 0 4px
}

.audit-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.audit-filter-label {
    font-family: Syncopate, sans-serif;
    font-size: .24rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .35)
}

.audit-date-input {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
    font-family: 'DM Sans', sans-serif;
    font-size: .78rem;
    padding: 5px 10px;
    outline: 0;
    color-scheme: dark;
    transition: border-color .2s
}

.audit-date-input:focus {
    border-color: rgba(201, 168, 76, .3)
}

.audit-kpi-row {
    margin-bottom: 8px
}

.audit-gold {
    color: rgba(201, 168, 76, .75) !important
}

.audit-period-val {
    font-size: 1rem !important
}

.audit-kpi-row .dash-kpi-val {
    font-family: Lora, serif;
    font-weight: 400
}

.audit-run {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 56px 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    opacity: 0;
    animation: dashFadeLeft .35s ease forwards;
    cursor: pointer;
    transition: all .2s;
    border-left: 2px solid transparent
}

.audit-run:last-child {
    border-bottom: none
}

.audit-run:hover:not(.selected) {
    background: rgba(201, 168, 76, .015)
}

.audit-run.selected {
    border-left-color: rgba(201, 168, 76, .6);
    padding-left: 14px;
    background: rgba(201, 168, 76, .03)
}

.audit-run.selected .audit-run-id {
    color: rgba(201, 168, 76, .6)
}

.audit-run.selected .audit-run-date {
    color: rgba(255, 255, 255, .9)
}

.audit-run-id {
    font-family: Lora, serif;
    font-size: .76rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .35);
    letter-spacing: .04em;
    min-width: 120px;
    flex-shrink: 0;
    transition: color .2s
}

.audit-run-left {
    min-width: 100px;
    flex-shrink: 0
}

.audit-run-date {
    font-size: .8rem;
    color: rgba(255, 255, 255, .7);
    font-weight: 500;
    transition: color .2s
}

.audit-run-time {
    font-size: .65rem;
    color: rgba(255, 255, 255, .25);
    margin-top: 1px
}

.audit-run-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 14px
}

.audit-run-badge {
    font-family: Syncopate, sans-serif;
    font-size: .24rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0
}

.audit-run-ct {
    font-size: .62rem;
    color: rgba(255, 255, 255, .2);
    white-space: nowrap
}

.audit-run-ccy {
    font-size: .62rem;
    color: rgba(255, 255, 255, .15);
    white-space: nowrap
}

.audit-run-right {
    flex-shrink: 0;
    text-align: right
}

.audit-run-val {
    font-family: Lora, serif;
    font-size: .94rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .75);
    white-space: nowrap
}

.audit-run-avg {
    font-family: Lora, serif;
    font-size: .64rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .25)
}

.audit-totals {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(201, 168, 76, .12);
    margin-top: 8px
}

.audit-totals-label {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35)
}

.audit-totals-inv {
    font-family: Lora, serif;
    font-size: .82rem;
    color: rgba(255, 255, 255, .5);
    margin-left: auto
}

.audit-totals-val {
    font-family: Lora, serif;
    font-size: .92rem;
    font-weight: 400;
    color: rgba(201, 168, 76, .75)
}

@media(max-width:560px) {
    .audit-top-section {
        padding: 16px 16px
    }

    .audit-header-row {
        flex-direction: column;
        gap: 12px
    }

    .audit-actions {
        flex-wrap: wrap
    }

    .audit-kpi-row .dash-kpi {
        padding: 12px 14px
    }

    .audit-kpi-row .dash-kpi-label {
        font-size: .3rem
    }

    .audit-kpi-row .dash-kpi-val {
        font-size: 1.1rem
    }

    .audit-period-val {
        font-size: .85rem !important
    }

    .audit-run-id {
        min-width: 85px;
        font-size: .64rem
    }

    .audit-run-ccy,
    .audit-run-ct {
        display: none
    }

    .audit-run-center {
        padding: 0 8px
    }

    .audit-run-left {
        min-width: 80px
    }

    .audit-run-date {
        font-size: .72rem
    }

    .audit-run-val {
        font-size: .82rem
    }

    .audit-run-avg {
        font-size: .56rem
    }

    .audit-run.selected {
        padding-left: 10px
    }

    .audit-filter-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px
    }

    .audit-filter-group {
        flex-direction: row;
        align-items: center;
        gap: 8px
    }

    .audit-date-input {
        flex: 1
    }
}

.email-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px
}

.email-title {
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45)
}

.email-stats {
    display: flex;
    gap: 24px
}

.email-stat {
    text-align: center
}

.email-stat-n {
    font-family: Lora, serif;
    font-size: 22px;
    display: block
}

.email-stat-n.gold {
    color: rgba(201, 168, 76, .8)
}

.email-stat-n.green {
    color: #5dcaa5
}

.email-stat-n.red {
    color: #e24b4a
}

.email-stat-l {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .25)
}

.email-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    align-items: center;
    flex-wrap: wrap
}

.email-tone-label {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3)
}

.email-tone-btn {
    padding: 9px 16px;
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .4);
    cursor: pointer;
    transition: all .2s
}

.email-tone-btn.on {
    border-color: rgba(201, 168, 76, .4);
    color: rgba(201, 168, 76, .8);
    background: rgba(201, 168, 76, .05)
}

.email-note-in {
    flex: 1;
    min-width: 180px;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .55);
    font-family: Lora, serif;
    font-size: 13px;
    padding: 8px 12px;
    outline: 0
}

.email-note-in::placeholder {
    color: rgba(255, 255, 255, .18)
}

.email-note-in:focus {
    border-color: rgba(201, 168, 76, .3)
}

.email-progress-wrap {
    height: 2px;
    background: rgba(255, 255, 255, .07);
    margin-bottom: 18px;
    display: none
}

.email-progress-fill {
    height: 2px;
    background: linear-gradient(90deg, #a07828, #e8c96a);
    width: 0%;
    transition: width .4s ease
}

.email-empty {
    text-align: center;
    padding: 48px 24px;
    color: rgba(255, 255, 255, .3);
    font-family: Lora, serif;
    font-size: 14px;
    font-style: italic
}

.email-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px
}

.email-table th {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .22);
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    text-align: left
}

.email-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
    vertical-align: top
}

.email-table tr:hover td {
    background: rgba(201, 168, 76, .02)
}

.email-chk {
    width: 16px;
    height: 16px;
    border: none;
    outline: 0;
    background: rgba(255, 255, 255, .08);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0
}

.email-chk:checked {
    background: rgba(201, 168, 76, .2)
}

.email-chk:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: 1.5px solid #c9a84c;
    border-top: none;
    border-left: none;
    transform: rotate(45deg)
}

.email-chk:focus {
    outline: 0
}

.email-name-td {
    font-family: Lora, serif;
    color: rgba(255, 255, 255, .75)
}

.email-agency-td {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .28)
}

.email-amount-td {
    font-family: Lora, serif;
    color: rgba(201, 168, 76, .75)
}

.email-addr-f {
    background: 0 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .55);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    padding: 3px 0;
    width: 170px;
    outline: 0
}

.email-addr-f::placeholder {
    color: rgba(255, 255, 255, .18)
}

.email-addr-f:focus {
    border-bottom-color: rgba(201, 168, 76, .4)
}

.email-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 7px
}

.email-s-pending {
    background: rgba(255, 255, 255, .18)
}

.email-s-sending {
    background: #e8c96a;
    animation: emailPulse 1s ease-in-out infinite
}

.email-s-sent {
    background: #5dcaa5
}

.email-s-failed {
    background: #e24b4a
}

@keyframes emailPulse {

    0%,
    100% {
        opacity: .4
    }

    50% {
        opacity: 1
    }
}

.email-status-txt {
    font-family: Syncopate, sans-serif;
    font-size: .3rem;
    letter-spacing: .12em;
    text-transform: uppercase
}

.email-sent-c {
    color: #5dcaa5
}

.email-failed-c {
    color: #e24b4a
}

.email-pending-c {
    color: rgba(255, 255, 255, .25)
}

.email-sending-c {
    color: #e8c96a
}

.email-eye-btn {
    background: 0 0;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(255, 255, 255, .2);
    transition: color .2s;
    display: inline-flex;
    align-items: center
}

.email-eye-btn:hover {
    color: rgba(201, 168, 76, .7)
}

.email-eye-btn.active {
    color: rgba(201, 168, 76, .9)
}

.email-preview {
    display: none;
    margin-top: 8px;
    padding: 14px 16px;
    background: rgba(4, 4, 4, .45);
    border: 1px solid rgba(201, 168, 76, .1)
}

.email-preview.show {
    display: block
}

.email-preview-label {
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .35);
    margin-bottom: 10px;
    display: block
}

.email-from-row,
.email-subject-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.email-from-label,
.email-subject-label {
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .35);
    white-space: nowrap;
    flex-shrink: 0
}

.email-from-val {
    font-family: Lora, serif;
    font-size: 13px;
    color: rgba(255, 255, 255, .4);
    font-style: italic
}

.email-subject-f {
    flex: 1;
    background: 0 0;
    border: none;
    border-bottom: 1px solid rgba(201, 168, 76, .15);
    color: rgba(255, 255, 255, .65);
    font-family: Lora, serif;
    font-size: 13px;
    padding: 3px 0;
    outline: 0
}

.email-subject-f:focus {
    border-bottom-color: rgba(201, 168, 76, .4)
}

.email-body-ta {
    width: 100%;
    background: 0 0;
    border: none;
    color: rgba(255, 255, 255, .55);
    font-family: Lora, serif;
    font-size: .72rem;
    line-height: 1.8;
    resize: vertical;
    outline: 0;
    min-height: 140px;
    padding: 0;
    margin-bottom: 12px
}

.email-body-ta:focus {
    color: rgba(255, 255, 255, .72)
}

.email-preview-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .06)
}

.email-regen-btn {
    padding: 7px 14px;
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: 0 0;
    border: 1px solid rgba(201, 168, 76, .2);
    color: rgba(201, 168, 76, .5);
    cursor: pointer;
    transition: all .2s
}

.email-regen-btn:hover {
    border-color: rgba(201, 168, 76, .5);
    color: rgba(201, 168, 76, .8)
}

.email-regen-note {
    font-family: Syncopate, sans-serif;
    font-size: .26rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .15)
}

.email-edited-badge {
    font-family: Syncopate, sans-serif;
    font-size: .26rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .5);
    margin-left: auto
}

.email-retry-btn {
    padding: 5px 12px;
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: 0 0;
    border: 1px solid rgba(224, 75, 74, .3);
    color: rgba(224, 75, 74, .7);
    cursor: pointer
}

.email-retry-btn:hover {
    border-color: rgba(224, 75, 74, .6);
    color: #e04b4a
}

.email-send-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(270deg, #a07828, #c8a84a, #d4b84e, #c8a84a, #a07828);
    background-size: 400% 400%;
    border: none;
    font-family: Syncopate, sans-serif;
    font-size: .38rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #0d0800;
    cursor: pointer;
    animation: emailBtnGold 8s ease infinite;
    transition: opacity .2s;
    margin-bottom: 14px
}

.email-send-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    animation: none
}

@keyframes emailBtnGold {
    0% {
        background-position: 0 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.email-footer-note {
    font-family: Syncopate, sans-serif;
    font-size: .28rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .18);
    text-align: center
}
/* ═══════════════════════════════════════════════════════════════════════════
   EMAIL DRAWER — cinematic side panel for previewing/editing contractor emails
   Replaces the inline .email-preview dropdown. Slides in from right.
   ═══════════════════════════════════════════════════════════════════════════ */

.email-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .32s ease;
    z-index: 9998;
}

.email-drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.email-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 540px;
    max-width: 92vw;
    background: #060401;
    border-left: 1px solid rgba(201, 168, 76, .14);
    box-shadow: -40px 0 80px rgba(0, 0, 0, .6);
    display: flex;
    flex-direction: column;
    transform: translateX(104%);
    transition: transform .42s cubic-bezier(.22, .61, .36, 1);
    z-index: 9999;
    overflow: hidden;
}

.email-drawer.show {
    transform: translateX(0);
}

/* subtle gold hairline highlight on the leading edge */
.email-drawer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(201, 168, 76, .5) 22%,
        rgba(201, 168, 76, .18) 50%,
        rgba(201, 168, 76, .5) 78%,
        transparent 100%);
    pointer-events: none;
}

.email-drawer-head {
    padding: 34px 36px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-shrink: 0;
}

.email-drawer-head-meta {
    flex: 1;
    min-width: 0;
}

.email-drawer-eyebrow {
    font-family: Syncopate, sans-serif;
    font-size: 9px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .55);
    margin-bottom: 18px;
}

.email-drawer-name {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: 32px;
    line-height: 1.1;
    color: rgba(255, 255, 255, .92);
    margin-bottom: 10px;
    letter-spacing: .005em;
}

.email-drawer-sub {
    font-family: Syncopate, sans-serif;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .7);
    display: flex;
    gap: 12px;
    align-items: center;
}

.email-drawer-sub-sep {
    opacity: .35;
}

.email-drawer-close {
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .55);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    border-radius: 0;
}

.email-drawer-close:hover {
    border-color: rgba(201, 168, 76, .5);
    color: rgba(201, 168, 76, .9);
}

.email-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.email-drawer-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email-drawer-field-grow {
    flex: 1;
    min-height: 220px;
}

.email-drawer-label {
    font-family: Syncopate, sans-serif;
    font-size: 9px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .45);
}

.email-drawer-from {
    font-family: Lora, serif;
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, .55);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.email-drawer-subject {
    background: 0 0;
    border: none;
    border-bottom: 1px solid rgba(201, 168, 76, .18);
    color: rgba(255, 255, 255, .88);
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 400;
    padding: 8px 0;
    outline: 0;
    transition: border-color .2s;
    width: 100%;
}

.email-drawer-subject:focus {
    border-bottom-color: rgba(201, 168, 76, .55);
}

.email-drawer-subject::placeholder {
    color: rgba(255, 255, 255, .2);
    font-style: italic;
}

.email-drawer-body-ta {
    flex: 1;
    width: 100%;
    background: rgba(4, 4, 4, .5);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 18px 20px;
    color: rgba(255, 255, 255, .78);
    font-family: Lora, serif;
    font-size: 14px;
    line-height: 1.75;
    resize: none;
    outline: 0;
    min-height: 260px;
    transition: border-color .2s;
}

.email-drawer-body-ta:focus {
    border-color: rgba(201, 168, 76, .3);
    color: rgba(255, 255, 255, .92);
}

.email-drawer-body-ta::placeholder {
    color: rgba(255, 255, 255, .2);
    font-style: italic;
}

.email-drawer-foot {
    padding: 18px 36px 30px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.email-drawer-btn {
    padding: 9px 18px;
    font-family: Syncopate, sans-serif;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    background: 0 0;
    border: 1px solid rgba(201, 168, 76, .3);
    color: rgba(201, 168, 76, .8);
    cursor: pointer;
    transition: all .22s;
}

.email-drawer-btn:hover {
    border-color: rgba(201, 168, 76, .6);
    color: rgba(201, 168, 76, 1);
    background: rgba(201, 168, 76, .05);
}

.email-drawer-btn:disabled {
    opacity: .35;
    cursor: wait;
}

.email-drawer-btn-ghost {
    margin-left: auto;
    border-color: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .55);
}

.email-drawer-btn-ghost:hover {
    border-color: rgba(255, 255, 255, .3);
    color: rgba(255, 255, 255, .9);
    background: transparent;
}

.email-drawer-note {
    font-family: Syncopate, sans-serif;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .25);
}

.email-drawer-edited {
    font-family: Syncopate, sans-serif;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, .65);
    padding: 4px 10px;
    border: 1px solid rgba(201, 168, 76, .25);
}

/* active row indicator in the table while drawer is open for that row */
.email-name-td.is-active {
    color: rgba(201, 168, 76, .95);
}

@media (max-width: 720px) {
    .email-drawer { width: 100%; }
    .email-drawer-head { padding: 24px 22px 20px; }
    .email-drawer-body { padding: 20px 22px; }
    .email-drawer-foot { padding: 14px 22px 22px; }
    .email-drawer-name { font-size: 26px; }
}

/* drawer tone selector — lives inside the drawer so it's reachable while open */
.email-drawer-tone-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.email-drawer-tone-btns {
    display: flex;
    gap: 6px;
    flex: 1;
}

.email-drawer-tone-btn {
    padding: 8px 16px;
    font-family: Syncopate, sans-serif;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    background: 0 0;
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: all .2s;
}

.email-drawer-tone-btn:hover {
    border-color: rgba(201, 168, 76, .3);
    color: rgba(201, 168, 76, .75);
}

.email-drawer-tone-btn.on {
    border-color: rgba(201, 168, 76, .55);
    color: rgba(201, 168, 76, 1);
    background: rgba(201, 168, 76, .04);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIT ROW DELETE BUTTON — always visible, subtle but discoverable.
   Finance users need obvious affordances, not hover-only patterns.
   ═══════════════════════════════════════════════════════════════════════════ */

.audit-run {
    position: relative; /* allows absolute positioning of the delete button */
}

.audit-run-delete {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .32);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 1; /* always visible — no hover reveal */
    transition: color .22s ease, background-color .22s ease, transform .12s ease;
}

.audit-run:hover .audit-run-delete {
    color: rgba(255, 255, 255, .55);
}

.audit-run-delete:hover {
    color: rgba(240, 100, 95, 1) !important;
    background: rgba(220, 60, 50, .08);
}

.audit-run-delete:active {
    transform: translateY(-50%) scale(.94);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD RUN ROW — per-row trash icon (matches Audit Trail pattern)
   Always visible, same weight as the Audit Trail delete.
   ═══════════════════════════════════════════════════════════════════════════ */

.dash-rc {
    padding-right: 56px; /* make room for the trash on the right edge */
}

.dash-rc-delete {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .28);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 1;
    transition: color .22s ease, background-color .22s ease, transform .12s ease;
}

.dash-rc:hover .dash-rc-delete {
    color: rgba(255, 255, 255, .5);
}

.dash-rc-delete:hover {
    color: rgba(240, 100, 95, 1) !important;
    background: rgba(220, 60, 50, .08);
}

.dash-rc-delete:active {
    transform: translateY(-50%) scale(.94);
}

/* When the row drawer is open, nudge the trash to keep pace with padding shift */
.dash-rc.dash-rc-open .dash-rc-delete {
    right: 16px; /* same position — just ensuring it doesn't drift */
}
