body {
    padding-top: 0;
}

.app-header {
    background: #fff;
    border-bottom: 1px solid #d1d1d1;
    padding: .8rem 0;
    margin-bottom: 3rem;
}

.app-header .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.app-header .header-end {
    display: flex;
    justify-content: flex-end;
}

.app-header .brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.6rem;
    color: #333;
    text-decoration: none;
}

.app-header .brand-mark {
    display: none;
}

.logout-form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9b4dca;
    font-size: 1.4rem;
    line-height: 1;
}

.logout-button svg {
    display: none;
    width: 1.9rem;
    height: 1.9rem;
}

.app-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-nav a {
    font-size: 1.4rem;
    color: #555;
    text-decoration: none;
}

.app-nav a:hover {
    color: #9b4dca;
}

.app-nav a.active {
    color: #9b4dca;
    font-weight: 700;
    border-bottom: 2px solid #9b4dca;
}

.card {
    background: #fff;
    border: 1px solid #d1d1d1;
    border-radius: .4rem;
    padding: 3rem;
}

.error-text {
    color: #d32f2f;
    font-size: 1.2rem;
}

.success-text {
    color: #155724;
}

.is-hidden {
    display: none;
}

.login-page {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 44rem;
}

.login-card h4 {
    margin-bottom: 2rem;
}

.login-card input {
    width: 100%;
}

.login-card .button {
    width: 100%;
    margin-bottom: 0;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.status-row h5 {
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.4rem;
}

.dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-grey {
    background: #aaa;
}

.dot-green {
    background: #28a745;
}

.dot-red {
    background: #dc3545;
}

.otp-panel {
    margin-top: 2rem;
}

#otp-message small {
    display: block;
    margin-top: .5rem;
}

.request-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.request-item:last-child {
    border-bottom: none;
}

.request-lead {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    min-width: 4rem;
    flex-shrink: 0;
}

.request-id {
    font-size: 1.2rem;
    color: #aaa;
}

.type-icon {
    width: 1.8rem;
    height: 1.8rem;
}

.type-blocking,
.type-confirm {
    color: #aaa;
}

.request-body {
    flex: 1;
    min-width: 0;
}

.request-android-id {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-name {
    font-size: 1.2rem;
    color: #888;
    margin-top: .2rem;
}

.request-trail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .3rem;
    flex-shrink: 0;
}

.request-status-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
}

.request-datetime {
    font-size: 1.1rem;
    color: #999;
    white-space: nowrap;
}

.status-pill {
    font-size: 1.1rem;
    font-weight: 700;
    padding: .3rem .9rem;
    border-radius: 2rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-error,
.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled,
.status-default {
    background: #e9ecef;
    color: #495057;
}

.request-action {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    justify-content: center;
    flex-shrink: 0;
}

.request-menu {
    position: relative;
    display: inline-flex;
}

.process-btn,
.request-menu-btn {
    background: none;
    border: none;
    padding: .3rem;
    cursor: pointer;
    color: #888;
    border-radius: .4rem;
    line-height: 0;
    transition: color .15s ease;
}

.process-btn:hover:not(:disabled),
.process-btn:focus:not(:disabled),
.request-menu-btn:hover,
.request-menu-btn:focus {
    color: #666;
    background-color: transparent;
}

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

.process-btn svg,
.request-menu-btn svg {
    width: 2rem;
    height: 2rem;
}

.request-menu-dropdown {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    z-index: 10;
    display: none;
    min-width: 16rem;
    padding: .5rem;
    background: #fff;
    border: 1px solid #d1d1d1;
    border-radius: .4rem;
    box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .12);
}

.request-menu.is-open .request-menu-dropdown {
    display: block;
}

.request-menu-command {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: .7rem .9rem;
    background: transparent;
    border: none;
    color: #555;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.request-menu-command:hover:not(:disabled),
.request-menu-command:focus:not(:disabled) {
    background: #f7f7f7;
    color: #333;
}

.request-menu-command:disabled {
    color: #bbb;
    cursor: not-allowed;
}

.process-btn svg.spinning {
    animation: spin .7s linear infinite;
}

#load-more-wrap {
    text-align: center;
    padding-top: 1.5rem;
}

#load-more-link {
    cursor: pointer;
    color: #9b4dca;
    font-size: 1.4rem;
}

#load-more-link:hover {
    text-decoration: underline;
}

.empty-state {
    color: #888;
}

.export-card {
    margin-bottom: 2rem;
}

.export-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.export-heading h4,
.export-tasks-card h5 {
    margin-bottom: 0;
}

.export-muted,
.export-task-meta {
    color: #888;
    font-size: 1.2rem;
}

.export-form fieldset {
    margin-bottom: 1.5rem;
}

.export-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.2rem;
}

.export-date-range.is-hidden {
    display: none;
}

.export-date-range label {
    grid-row: 1;
}

.export-message {
    min-height: 1.8rem;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.export-tasks-card {
    margin-top: 2rem;
}

.export-task-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.export-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.export-task-item:last-child {
    border-bottom: none;
}

.export-task-main {
    min-width: 0;
}

.export-task-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.export-task-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .8rem;
    flex-shrink: 0;
}

.export-download-link {
    color: #9b4dca;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}

.export-download-link:hover {
    text-decoration: underline;
}

.export-download-link.is-disabled {
    color: #aaa;
    cursor: not-allowed;
    pointer-events: none;
}

.otp-page {
    font-family: Arial, sans-serif;
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.otp-page .form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

.otp-page h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.otp-page .form-group {
    margin-bottom: 20px;
}

.otp-page label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.otp-page input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.otp-page input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
}

.otp-page button {
    width: 100%;
    padding: 12px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.otp-page button:hover {
    background-color: #005a87;
}

.otp-page button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.otp-page .message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.otp-page .success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.otp-page .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.blend-hard-light {
    mix-blend-mode: hard-light;
}

.blend-plus-darker {
    mix-blend-mode: plus-darker;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 40rem) {
    .container {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }

    .app-header {
        padding: .7rem 0;
        margin-bottom: 2rem;
    }

    .app-header .header-inner {
        grid-template-columns: auto 1fr auto;
        gap: 1.2rem;
    }

    .app-header .brand-full,
    .logout-button .logout-text {
        display: none;
    }

    .app-header .brand-mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        border: 1px solid #d1d1d1;
        color: #333;
        font-size: 1.5rem;
        font-weight: 700;
    }

    .logout-button {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
    }

    .logout-button svg {
        display: block;
    }

    .login-page {
        align-items: flex-start;
        min-height: auto;
        padding-top: 1rem;
    }

    .status-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.4rem;
        padding: .3rem .6rem;
        font-size: 0;
    }

    .status-pill::before {
        content: attr(data-status-letter);
        font-size: 1.1rem;
    }

    .export-heading,
    .export-task-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .export-date-range {
        display: block;
    }

    .export-task-actions {
        width: 100%;
        justify-content: space-between;
    }
}
