:root {
    --classic-desktop: #d4d0c8;
    --classic-panel: #ece9d8;
    --classic-surface: #ffffff;
    --classic-surface-muted: #f2f2f2;
    --classic-header: #dcdcdc;
    --classic-border: #808080;
    --classic-border-light: #b7b7b7;
    --classic-input-border: #7f9db9;
    --classic-text: #222222;
    --classic-muted: #666666;
    --classic-blue: #3f648d;
    --classic-blue-dark: #315276;
    --classic-green: #3f743f;
    --classic-green-dark: #315f31;
    --classic-red: #8b3737;
    --classic-red-dark: #732d2d;
    --classic-amber: #9a681e;
    --app-header-bg: #0f172a;
    --app-header-fg: #e2e8f0;
    --app-header-link: #cbd5e1;
    --app-header-link-active: #ffffff;
    --app-header-border: #1e293b;
}

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

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--classic-desktop);
    color: var(--classic-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}

button,
input,
select,
textarea {
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: #214f82;
    text-decoration: none;
}

a:hover {
    color: #173a61;
    text-decoration: underline;
}

code {
    padding: 1px 3px;
    border: 1px solid #a6a6a6;
    border-radius: 0;
    background: #ffffff;
    color: #222222;
    font-family: "Courier New", monospace;
    font-size: 11px;
    word-break: break-all;
}

.app-shell-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
    padding: 7px 10px;
    border-bottom: 1px solid var(--app-header-border);
    background: var(--app-header-bg);
    color: var(--app-header-fg);
}

.app-shell-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.app-shell-brand {
    color: var(--app-header-fg);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.app-shell-brand:hover {
    color: var(--app-header-link-active);
    text-decoration: none;
}

.app-shell-links {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.app-shell-link {
    min-height: 24px;
    padding: 3px 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-header-link);
    font: inherit;
    font-size: 12px;
    line-height: 16px;
    text-decoration: none;
}

.app-shell-link:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--app-header-link-active);
    text-decoration: none;
}

.app-shell-link.is-active {
    background: rgba(148, 163, 184, 0.25);
    color: var(--app-header-link-active);
    font-weight: 700;
}

.app-shell-user {
    color: var(--app-header-fg);
    font-size: 11px;
}

.app-shell-logout {
    display: inline;
    margin: 0;
}

.app-shell-logout button {
    cursor: pointer;
}

.app-shell-main {
    width: 100%;
    padding: 6px;
}

.app-shell-main > .container,
.app-shell-main > .container-fluid {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--classic-border);
    border-radius: 0;
    background: var(--classic-panel);
}

.app-shell-main > .container > .d-flex:first-child,
.app-shell-main > .container-fluid > .d-flex:first-child {
    margin-bottom: 8px !important;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--classic-border);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    margin-top: 0;
    color: #111111;
    font-weight: 700;
    line-height: 1.2;
}

h1,
.h1,
.h2,
.h3 {
    font-size: 18px;
}

h2,
h3,
.h4,
.h5 {
    font-size: 14px;
}

h4,
h5,
h6,
.h6 {
    font-size: 12px;
}

h2 {
    margin-bottom: 6px;
}

p {
    margin-top: 0;
}

hr {
    margin: 10px 0;
    border: 0;
    border-top: 1px solid var(--classic-border);
}

.text-muted,
.form-text {
    color: var(--classic-muted) !important;
}

.rounded {
    border-radius: 0 !important;
}

.shadow,
.shadow-sm,
.shadow-lg {
    box-shadow: none !important;
}

.bg-light {
    background: var(--classic-surface-muted) !important;
}

.app-shell-main .mt-5 {
    margin-top: 12px !important;
}

.app-shell-main .mb-4,
.modal .mb-3 {
    margin-bottom: 8px !important;
}

.app-shell-main > .container.py-3 {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.btn {
    display: inline-block;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #4f4f4f;
    border-radius: 0;
    background: #e5e5e5;
    box-shadow: none !important;
    color: #111111;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    transition: none;
}

.btn:hover,
.btn:focus {
    color: #111111;
    text-decoration: none;
}

.btn:hover {
    background: #d5d5d5;
}

.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 1px dotted #000000;
    outline-offset: 1px;
    box-shadow: none !important;
}

.btn-sm {
    min-height: 22px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    border-color: #9a9a9a;
    background: var(--classic-desktop);
    color: #777777;
    cursor: not-allowed;
    opacity: 1;
}

.btn-primary,
.btn-info {
    border-color: #25476c;
    background: var(--classic-blue);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled):active {
    border-color: #25476c;
    background: var(--classic-blue-dark);
    color: #ffffff;
}

.btn-success {
    border-color: #285128;
    background: var(--classic-green);
    color: #ffffff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active {
    border-color: #285128;
    background: var(--classic-green-dark);
    color: #ffffff;
}

.btn-danger {
    border-color: #662626;
    background: var(--classic-red);
    color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active {
    border-color: #662626;
    background: var(--classic-red-dark);
    color: #ffffff;
}

.btn-secondary {
    border-color: #555555;
    background: #707070;
    color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:not(:disabled):not(.disabled):active {
    border-color: #555555;
    background: #5d5d5d;
    color: #ffffff;
}

.btn-warning {
    border-color: #7a5116;
    background: var(--classic-amber);
    color: #ffffff;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success {
    background: #e5e5e5;
}

.btn-outline-primary {
    border-color: #25476c;
    color: #25476c;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--classic-blue);
    color: #ffffff;
}

.btn-outline-secondary {
    border-color: #666666;
    color: #333333;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: #d5d5d5;
    color: #111111;
}

.btn-outline-danger {
    border-color: #662626;
    color: #662626;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: var(--classic-red);
    color: #ffffff;
}

.btn-outline-success {
    border-color: #285128;
    color: #285128;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background: var(--classic-green);
    color: #ffffff;
}

.form-group {
    margin-bottom: 9px;
}

label,
.font-weight-bold {
    color: var(--classic-text);
    font-size: 11px;
    font-weight: 700;
}

.form-control,
.custom-select {
    min-height: 27px;
    height: 27px;
    padding: 3px 5px;
    border: 1px solid var(--classic-input-border);
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    box-shadow: none;
    font-size: 12px;
    line-height: 17px;
}

textarea.form-control {
    min-height: 66px;
    height: auto;
    resize: vertical;
}

.form-control:focus,
.custom-select:focus {
    border-color: #204a7a;
    box-shadow: none;
}

.form-control:disabled,
.form-control[readonly] {
    border-color: #9a9a9a;
    background: #e5e5e5;
    color: #777777;
}

.form-control-file {
    color: var(--classic-text);
    font-size: 11px;
}

.form-text,
small {
    font-size: 11px;
}

.custom-control-label {
    padding-top: 1px;
    font-weight: 400;
}

.custom-control-label::before,
.custom-control-label::after {
    top: 0.1rem;
}

.custom-control-input:checked ~ .custom-control-label::before {
    border-color: #25476c;
    background: var(--classic-blue);
}

.card {
    border: 1px solid var(--classic-border);
    border-radius: 0;
    background: var(--classic-surface-muted);
    box-shadow: none;
}

.card-body {
    padding: 9px;
}

.card-title {
    margin-bottom: 7px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--classic-border-light);
}

.table-responsive {
    margin-top: 6px;
    border: 1px solid var(--classic-border);
    border-radius: 0;
    background: var(--classic-surface);
}

.card > .table-responsive,
.modal .table-responsive {
    margin-top: 0;
    border: 0;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    background: var(--classic-surface);
    color: var(--classic-text);
    font-size: 11px;
}

.table th,
.table td {
    padding: 4px 6px;
    border-top: 0;
    border-right: 1px solid #d5d5d5;
    border-bottom: 1px solid #c5c5c5;
    vertical-align: middle;
}

.table th:last-child,
.table td:last-child {
    border-right: 0;
}

.table thead th,
.table .thead-dark th,
.table .thead-light th {
    border-top: 0;
    border-right: 1px solid #a6a6a6;
    border-bottom: 1px solid #707070;
    background: var(--classic-header);
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #ffffff;
}

.table-striped tbody tr:nth-of-type(even) {
    background: #f4f4f4;
}

.table-hover tbody tr:hover {
    background: #ffffd7;
    color: inherit;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border-color: #a6a6a6;
}

.table-sm th,
.table-sm td {
    padding: 3px 5px;
}

.badge {
    display: inline-block;
    padding: 2px 5px;
    border: 1px solid #888888;
    border-radius: 0;
    background: #e5e5e5;
    color: #222222;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.status-PENDING,
.status-pending {
    background: #fff1b8;
    color: #5f4300;
}

.status-IN_PROGRESS,
.status-PUBLISHING {
    background: #c9ddf3;
    color: #173a61;
}

.status-COMPLETED,
.status-COMPLETE,
.status-ACCEPTED,
.status-REVIEWED {
    background: #d5ead0;
    color: #254d25;
}

.status-UPLOADED {
    background: #d5e8eb;
    color: #194d55;
}

.status-FAILED,
.status-ERROR,
.status-REJECTED {
    background: #efd0d0;
    color: #662626;
}

.status-CONSUMED,
.status-CLOSED {
    background: #d4d0c8;
    color: #333333;
}

.alert {
    position: relative;
    margin-bottom: 7px;
    padding: 6px 8px;
    border: 1px solid var(--classic-border);
    border-left-width: 4px;
    border-radius: 0;
    background: #ffffff;
    color: var(--classic-text);
    font-size: 12px;
}

.alert-success {
    border-left-color: var(--classic-green);
    background: #e5f2e2;
}

.alert-warning {
    border-left-color: var(--classic-amber);
    background: #ffffe1;
}

.alert-danger,
.alert-error {
    border-left-color: var(--classic-red);
    background: #f5dfdf;
}

.alert-info {
    border-left-color: var(--classic-blue);
    background: #e4edf7;
}

.alert-dismissible {
    padding-right: 32px;
}

.alert .close {
    top: 0;
    right: 2px;
    padding: 3px 8px;
    color: #222222;
    font-size: 17px;
}

.flash-messages {
    margin-bottom: 8px;
}

.modal-content {
    overflow: hidden;
    border: 2px solid #4f4f4f;
    border-radius: 0;
    background: var(--classic-panel);
    box-shadow: none;
}

.modal-header {
    align-items: center;
    padding: 7px 9px;
    border-bottom: 1px solid var(--classic-border);
    background: var(--classic-header);
}

.modal-title {
    margin: 0;
    color: #111111;
    font-size: 14px;
    font-weight: 700;
}

.modal-header .close {
    width: 22px;
    height: 22px;
    margin: -3px -3px -3px auto;
    padding: 0;
    border: 1px solid #606060;
    border-radius: 0;
    background: #e5e5e5;
    color: #111111;
    font-size: 17px;
    line-height: 18px;
    text-shadow: none;
}

.modal-body {
    padding: 9px;
    color: var(--classic-text);
    font-size: 12px;
}

.modal-footer {
    gap: 5px;
    padding: 7px 9px;
    border-top: 1px solid var(--classic-border);
    background: var(--classic-panel);
}

.modal-body dl.row dt,
.modal-body dl.row dd {
    margin-bottom: 0;
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #c5c5c5;
}

.modal-body dl.row dt {
    color: var(--classic-text);
    font-size: 11px;
    font-weight: 700;
}

.spider-info {
    margin-bottom: 10px;
    padding: 7px;
    border: 1px solid var(--classic-border);
    border-radius: 0;
    background: var(--classic-surface-muted);
}

.spider-info h3 {
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--classic-border-light);
}

.spider-info .info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border-bottom: 1px solid #c5c5c5;
}

.spider-info .info-row:last-child {
    border-bottom: 0;
}

.spider-info .info-label {
    color: var(--classic-muted);
    font-size: 11px;
    font-weight: 700;
}

.spider-info .info-value {
    color: #111111;
    text-align: right;
}

.file-link,
.project-id-link {
    color: #214f82;
    font-weight: 700;
    text-decoration: none;
}

.file-link:hover,
.project-id-link:hover {
    color: #173a61;
    text-decoration: underline;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 6px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 10px;
    border: 2px solid #4f4f4f;
    border-radius: 0;
    background: var(--classic-panel);
    box-shadow: none;
}

.login-card h1 {
    margin-bottom: 3px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--classic-border);
    font-size: 18px;
}

.login-card .subtitle {
    margin: 6px 0 10px;
    color: var(--classic-muted);
    font-size: 11px;
}

@media (max-width: 768px) {
    .app-shell-header {
        padding: 6px;
    }

    .app-shell-nav,
    .app-shell-links {
        align-items: flex-start;
    }

    .app-shell-main {
        padding: 4px;
    }

    .app-shell-main > .container,
    .app-shell-main > .container-fluid {
        padding: 5px;
    }

    .app-shell-main > .container > .d-flex:first-child,
    .app-shell-main > .container-fluid > .d-flex:first-child {
        align-items: flex-start !important;
        gap: 5px;
        flex-wrap: wrap;
    }

    h1,
    .h1,
    .h2,
    .h3 {
        font-size: 16px;
    }

    .table th,
    .table td {
        padding: 3px 5px;
    }

    .spider-info .info-row {
        display: block;
    }

    .spider-info .info-value {
        display: block;
        margin-top: 2px;
        text-align: left;
    }
}
