:root {
    --wp-blue: #123c69;
    --wp-blue-dark: #0b2949;
    --wp-gold: #f5b301;
    --wp-bg: #f4f6f8;
}

body {
    background: var(--wp-bg);
    color: #17202a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    padding: 24px;
}

.app-navbar {
    background: var(--wp-blue);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link {
    color: #fff;
}

.app-navbar .nav-link:hover,
.app-navbar .navbar-brand:hover {
    color: var(--wp-gold);
}

.app-navbar .nav-link.active {
    color: var(--wp-gold);
    font-weight: 700;
}

.nav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 3px;
}

.btn-primary {
    background: var(--wp-blue);
    border-color: var(--wp-blue);
}

.btn-primary:hover {
    background: var(--wp-blue-dark);
    border-color: var(--wp-blue-dark);
}

.btn-accent {
    background: var(--wp-gold);
    border-color: var(--wp-gold);
    color: #1d2733;
    font-weight: 600;
}

.card {
    border-radius: 8px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card,
.install-card {
    max-width: 440px;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 15px 45px rgba(18, 60, 105, .14);
    padding: 32px;
}

.login-logo {
    max-height: 82px;
    max-width: 180px;
    object-fit: contain;
}

.metric-card {
    border: 0;
    box-shadow: 0 8px 24px rgba(18, 60, 105, .08);
}

.metric-value {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--wp-blue);
}

.register-summary-panel,
.amount-cell {
    font-variant-numeric: tabular-nums;
}

.register-summary-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid #bfd8f8;
    border-radius: 8px;
    background: #dceeff;
    color: #0f4fc7;
}

.register-search-panel {
    padding: 12px 14px;
    border: 1px solid #d9e4f2;
    border-radius: 8px;
    background: #f8fbff;
}

.register-search-panel .form-label {
    margin-bottom: 4px;
}

.search-result-status {
    font-size: .92rem;
}

.register-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 3px solid #1f63e9;
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.register-summary-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    gap: 0;
}

.register-summary-item {
    min-width: 0;
    padding: 0 18px;
}

.register-summary-item + .register-summary-item {
    border-left: 1px solid rgba(31, 99, 233, .24);
}

.summary-qty {
    color: #093a91;
    font-size: .92rem;
    font-weight: 650;
}

.summary-amount {
    color: #0e51d3;
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2px;
}

.summary-rate {
    color: #496b98;
    font-size: .78rem;
    margin-top: 2px;
}

.register-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 0 8px;
}

.amount-cell {
    font-variant-numeric: tabular-nums;
}

.amount-cell {
    min-width: 96px;
}

.add-job-trigger {
    --add-job-ease: cubic-bezier(0.22, 1, 0.36, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--wp-blue);
    background: var(--wp-blue);
    color: #fff;
    padding: 0 12px;
    font-size: .92rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
    cursor: pointer;
    transition:
        width .28s var(--add-job-ease),
        min-width .28s var(--add-job-ease),
        gap .28s var(--add-job-ease),
        background-color .18s ease,
        box-shadow .18s ease,
        opacity .18s ease;
}

.add-job-trigger__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    overflow: hidden;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform .28s var(--add-job-ease);
}

.add-job-trigger__icon::before,
.add-job-trigger__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.add-job-trigger__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.add-job-trigger:focus-visible {
    outline: 3px solid rgba(245, 179, 1, .35);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .add-job-trigger:hover:not(:disabled):not(.is-row-open),
    .add-job-trigger:focus-visible:not(:disabled):not(.is-row-open) {
        width: 124px;
        min-width: 124px;
        gap: 8px;
        background: var(--wp-blue-dark);
        color: #fff;
        box-shadow: 0 6px 18px rgba(18, 60, 105, .18);
    }

    .add-job-trigger:hover:not(:disabled):not(.is-row-open) .add-job-trigger__icon,
    .add-job-trigger:focus-visible:not(:disabled):not(.is-row-open) .add-job-trigger__icon {
        transform: rotate(90deg);
    }

    .add-job-trigger:hover:not(:disabled):not(.is-row-open) .add-job-trigger__label,
    .add-job-trigger:focus-visible:not(:disabled):not(.is-row-open) .add-job-trigger__label {
        max-width: 68px;
        opacity: 1;
        transform: translateX(0);
        transition-delay: .07s;
    }
}

.add-job-trigger.is-loading {
    background: var(--wp-blue-dark);
    color: #fff;
    cursor: wait;
}

.add-job-trigger:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.add-job-trigger.is-row-open {
    width: 40px;
    min-width: 40px;
    gap: 0;
}

.add-job-trigger.is-row-open .add-job-trigger__icon {
    transform: rotate(0deg);
}

.add-job-trigger.is-row-open .add-job-trigger__label {
    max-width: 0;
    opacity: 0;
    transform: translateX(-6px);
}

.add-job-trigger__label {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-6px);
    transition:
        max-width .22s var(--add-job-ease),
        opacity .16s ease,
        transform .2s var(--add-job-ease);
    white-space: nowrap;
}

@media (hover: none) {
    .add-job-trigger {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }
}

.inline-editor-row td {
    background: #fffef7;
    vertical-align: top;
}

.inline-editor-row .inline-input {
    min-width: 120px;
}

.inline-editor-row [name="client_name"],
.inline-editor-row [name="file_name"] {
    min-width: 180px;
}

.inline-status {
    min-width: 150px;
    white-space: normal;
    font-size: .78rem;
    margin-top: 4px;
}

.table-register {
    white-space: nowrap;
    font-size: .92rem;
}

.table-register .file-name-cell {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.table-register thead th {
    position: sticky;
    top: 0;
    background: #eaf0f7;
    color: #0f2f52;
    z-index: 2;
}

.form-control:focus,
.form-select:focus,
.btn:focus {
    box-shadow: 0 0 0 .2rem rgba(245, 179, 1, .25);
    border-color: var(--wp-gold);
}

.muted-user {
    opacity: .8;
}

.env-badge {
    background: var(--wp-gold);
    color: #17202a;
    border-radius: 4px;
    font-weight: 700;
}

.app-footer {
    color: #6c757d;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px 24px 18px;
    font-size: .82rem;
}

.empty-state {
    color: #6c757d;
    padding: 32px 12px;
    text-align: center;
}

@media (max-width: 991.98px) {
    .register-summary-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 12px;
    }
    .register-summary-item:nth-child(3) {
        border-left: 0;
        padding-top: 10px;
        border-top: 1px solid rgba(31, 99, 233, .24);
    }
}

@media (max-width: 575.98px) {
    .register-summary-panel {
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    .register-summary-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
        border-width: 2px;
    }
    .register-summary-sections {
        grid-template-columns: 1fr;
    }
    .register-summary-item {
        padding: 0;
    }
    .register-summary-item + .register-summary-item {
        border-left: 0;
        border-top: 1px solid rgba(31, 99, 233, .24);
        padding-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .add-job-trigger,
    .add-job-trigger__icon,
    .add-job-trigger__label {
        transition-duration: .01ms;
        transition-delay: 0ms;
    }
}

.print-logo {
    max-height: 60px;
}

@media print {
    .no-print,
    .app-navbar {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .app-shell {
        padding: 0;
    }
}
