/* ── Page shell (orbit page only) ───────────────────────── */
body.orbit-page {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}


body.orbit-page #home-layout {
    flex: 1;
    min-height: 0;
}

#side-banner-left {
    align-self: stretch;
    top: 0;
    right: 0;
    margin: 0;
}

#orbit-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 10px;
    flex: 1;
    align-self: stretch;
    height: 100%;
    width: auto !important;
    max-width: 1540px !important;
    margin: 0 auto !important;
}

/* ── Two-column layout ──────────────────────────────────── */
#orbit-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px;
    overflow: hidden;
    padding: 0 20px 20px 20px;
}

/* Board overrides */
#orbit-sidebar.board,
#orbit-main.board {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
}

/* ── Sidebar ────────────────────────────────────────────── */
#orbit-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.sidebar-state-msg {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    padding: 16px 12px;
    margin: 0;
}

#orbit-sidebar-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 2px solid #000;
}

#orbit-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#orbit-sidebar-header .button {
    font-size: 11px;
    padding: 4px 10px;
}

.orbit-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}
.orbit-scroll::-webkit-scrollbar { display: none; }

.orbit-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    gap: 8px;
}

.orbit-sidebar-item:hover,
.orbit-sidebar-item.active {
    background-color: var(--backgroundColor);
    color: white;
}

.orbit-item-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Company group ──────────────────────────────────────── */
.orbit-group {
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    margin: 6px 4px 3px;
}
.orbit-group:first-child { margin-top: 6px; }

.orbit-group-header {
    padding: 6px 12px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #000;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.orbit-group-header:not(.collapsed) {
    border-bottom: 2px solid #000;
}
.orbit-group-header:hover { background: #f4f4f4; }

.orbit-group-arrow {
    font-size: 10px;
    line-height: 1;
    transition: transform 0.2s ease;
    display: inline-block;
}
.orbit-group-header.collapsed .orbit-group-arrow {
    transform: rotate(-90deg);
}

.orbit-group-items.collapsed { display: none; }

/* ── Status badges ──────────────────────────────────────── */
.status-badge {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid;
}

.status-open          { color: #16a34a; border-color: #16a34a; } /* green      — In Progress      */
.status-active        { color: #d97706; border-color: #d97706; } /* amber      — Creating         */
.status-payment-due   { color: #ea580c; border-color: #ea580c; } /* orange-red — Awaiting Payment */
.status-completed     { color: #1d4ed8; border-color: #1d4ed8; } /* blue       — Completed        */
.status-declined      { color: #dc2626; border-color: #dc2626; } /* red        — Declined         */
.direct-offer-tag     { color: #7c3aed; border-color: #7c3aed; } /* purple     — Direct Offer     */

/* on hover/active row keep the colour visible against navy */
.orbit-sidebar-item:hover .status-badge,
.orbit-sidebar-item.active .status-badge {
    opacity: 0.85;
}

/* ── Main panel ─────────────────────────────────────────── */
#orbit-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#orbit-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── Orbit detail ───────────────────────────────────────── */
#orbit-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#orbit-detail-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
    gap: 10px;
}

#orbit-detail-header h3 {
    margin: 0 0 2px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.orbit-detail-counterpart {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #000;
    flex-shrink: 0;
}
.orbit-detail-counterpart:hover span {
    text-decoration: underline;
}
.orbit-detail-counterpart-pp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000;
    flex-shrink: 0;
}
.orbit-detail-counterpart span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.orbit-detail-payment {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--backgroundColor);
    border: 2px solid var(--backgroundColor);
    padding: 2px 8px;
}

.orbit-detail-divider {
    width: 2px;
    height: 36px;
    background: #000;
    flex-shrink: 0;
}

.orbit-company-name {
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#orbit-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none;
}
#orbit-detail-body::-webkit-scrollbar { display: none; }

.orbit-criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 2px solid #000;
    padding-top: 14px;
}

.orbit-criteria-item {
    padding: 10px 12px;
}

.orbit-criteria-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 6px;
}

.orbit-criteria-value {
    font-size: 12px;
    font-weight: 700;
    color: #000;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.orbit-criteria-value svg {
    width: 20px;
    height: 20px;
}

.orbit-description {
    font-size: 13px;
    line-height: 1.8;
    color: #333;
    letter-spacing: 0;
    text-transform: none;
}

/* ── Comments ───────────────────────────────────────────── */
#orbit-comments-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 2px solid #000;
    padding-top: 14px;
}

.orbit-comment {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.orbit-comment:last-child { border-bottom: none; }

.orbit-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.orbit-comment-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.orbit-comment-time {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.orbit-comment-text {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
}

.orbit-comment-attachment {
    display: block;
    max-width: 260px;
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-top: 8px;
    cursor: pointer;
}

/* ── Attachment lightbox ─────────────────────────────────── */
#orbit-attachment-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
}

#orbit-attachment-lightbox.hidden { display: none; }

#orbit-attachment-lightbox-box {
    cursor: default;
    margin: 0;
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    max-width: calc(100vw - 40px);
}

#orbit-attachment-lightbox-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    border-bottom: 2px solid #000;
    flex-shrink: 0;
}

#orbit-attachment-lightbox-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

#orbit-attachment-lightbox img,
#orbit-attachment-lightbox video {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
    display: block;
    padding: 20px;
}

#orbit-comment-input-row {
    display: flex;
    gap: 0;
    align-items: stretch;
}

#orbit-comment-actions {
    display: flex;
    flex-direction: column;
}

#orbit-comment-actions .button {
    flex: 1;
    margin-top: -2px;
}


#orbit-comment-textarea {
    flex: 1;
    font-size: 13px;
    font-weight: normal;
    resize: none;
    padding: 8px;
}

#orbit-comment-textarea:focus {
    box-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000;
    margin-bottom: 2px;
}


/* ── Applicants ─────────────────────────────────────────── */
#orbit-applicants-section {
    border-top: 2px solid #000;
    display: flex;
    flex-direction: column;
}

#orbit-applicants-title {
    padding: 8px 14px;
    border-bottom: 2px solid #000;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    flex-shrink: 0;
}

#orbit-applicants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

/* Search card styles scoped to orbit applicants */
#orbit-applicants-list .search-card {
    border: 3px solid black;
    box-shadow: 4px 4px 0px 0px black;
    background: white;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: box-shadow 0.1s, transform 0.1s;
}
#orbit-applicants-list .search-card:hover {
    box-shadow: 6px 6px 0px 0px black;
    transform: translate(-1px, -1px);
}
#orbit-applicants-list .search-card:active {
    box-shadow: 0px 0px 0px 0px black;
    transform: translate(4px, 4px);
    transition: box-shadow 0s, transform 0s;
}
#orbit-applicants-list .search-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid black;
    object-fit: cover;
    flex-shrink: 0;
}
#orbit-applicants-list .search-card-info {
    flex: 1;
    min-width: 0;
}
#orbit-applicants-list .search-card-name {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#orbit-applicants-list .search-card-meta {
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}
#orbit-applicants-list .search-card-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}
#orbit-applicants-list .search-card-icons svg {
    width: 18px;
    height: 18px;
}

.orbit-applicant-item {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.orbit-applicant-item:hover {
    background-color: var(--backgroundColor);
    color: var(--textColor);
}

/* ── Action bar ─────────────────────────────────────────── */
.orbit-action-info {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    display: flex;
    align-items: center;
    flex: 1;
}

#orbit-action-bar {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 2px solid #000;
    display: flex;
    gap: 8px;
    background: white;
}

/* ── Modal overlay ──────────────────────────────────────── */
.orbit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.orbit-modal.hidden { display: none; }

/* ── Create orbit form ──────────────────────────────────── */
#create-orbit-modal-content,
#direct-orbit-modal-content {
    width: 680px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    overflow: visible;
    margin: 0;
    border: 3px solid #000;
    background-color: #fff;
}

#create-orbit-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
}

#create-orbit-modal-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#create-orbit-modal-header span {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}


#create-orbit-form {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Create-orbit form inputs ── */
#create-orbit-form .brutalist-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: normal;
}

#sumbit-orbit-button {
    position: relative;
    z-index: 0;
}

/* ── Sidebar actions row ── */
#orbit-sidebar-actions {
    display: flex;
    gap: 5px;
}

/* ── History panel ── */
#orbit-layout.hidden,
#orbit-history.hidden { display: none; }

#orbit-history {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    margin: 0;
}

#orbit-history-top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 2px solid #000;
}

#orbit-history-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.orbit-history-filter {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.orbit-history-filter:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #000;
}

.orbit-history-filter.active {
    background: #000;
    color: #fff;
    transform: translate(2px, 2px);
    box-shadow: none;
}

#orbit-history-summary {
    flex-shrink: 0;
}

.orbit-history-summary-card {
    border: 3px solid #000;
    box-shadow: 4px 4px 0 #000;
    background: #000;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.orbit-history-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.orbit-history-stat-value {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.orbit-history-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

#orbit-history-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

#orbit-history-list::-webkit-scrollbar { display: none; }

.orbit-history-card {
    flex-shrink: 0;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.orbit-history-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.orbit-history-card-title {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.orbit-history-card-date {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}

.orbit-history-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.history-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 2px 8px;
    border: 2px solid #000;
    background: #000;
    color: #fff;
    white-space: nowrap;
}

.history-badge.type-creator { background: #2980b9; border-color: #2980b9; }
.history-badge.type-company { background: #27ae60; border-color: #27ae60; }
.history-badge.history-badge-active { background: #f39c12; border-color: #f39c12; }
.history-badge.history-badge-cycle  { background: #8e44ad; border-color: #8e44ad; }

.history-sub-log-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    color: #888;
}
.history-sub-log-toggle:hover { color: #000; }
.history-sub-log-arrow { display: inline-block; transition: transform 0.15s; font-size: 9px; }

.history-sub-log-body {
    display: none;
    max-height: 220px;
    overflow-y: auto;
    border-top: none;
    margin-top: 8px;
    padding-top: 0;
}
.history-sub-log-body.open { display: block; }

.orbit-history-card-amounts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.history-amount-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.history-amount-row.total {
    font-size: 14px;
    font-weight: 900;
    border-top: 2px solid #000;
    padding-top: 6px;
    margin-top: 2px;
}

.history-amount-pos {
    color: #27ae60;
    font-weight: 900;
}

.history-no-payment {
    font-size: 11px;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.history-content-link {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #000;
    text-decoration: none;
    align-self: flex-start;
    padding: 3px 10px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.history-content-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #000;
}

/* ── Submission log ── */
.orbit-submission-log {
    border-top: 2px solid #000;
    margin-top: 12px;
    padding-top: 12px;
}

.history-submission-log {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.orbit-submission-log-header {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 8px;
}

.orbit-sub-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.orbit-sub-row:last-child { border-bottom: none; }

.orbit-sub-num {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    min-width: 28px;
    letter-spacing: 1px;
}

.orbit-sub-platform {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.orbit-sub-date {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.orbit-sub-link {
    font-size: 11px;
    padding: 5px 12px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Payment amount ── */
#payment-amount-row {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    background: #fff;
    position: relative;
    top: 0;
    left: 0;
    transition: border 0.15s, box-shadow 0.15s, top 0.15s, left 0.15s;
    cursor: text;
}

#payment-amount-row:hover {
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000;
    top: -3px;
    left: -3px;
}

#payment-currency-symbol {
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border-right: 1px solid #ccc;
    background: #f8f8f8;
    align-self: stretch;
    display: flex;
    align-items: center;
}

#payment-amount-input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    top: 0 !important;
    left: 0 !important;
}

#payment-summary {
    margin-top: 6px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 12px;
    letter-spacing: 1px;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    color: #555;
}

.payment-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 2px solid #000;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ── Lock toggle ── */
#orbit-lock-row {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    top: 0;
    left: 0;
    transition: border 0.15s, box-shadow 0.15s, top 0.15s, left 0.15s;
    user-select: none;
}
#orbit-lock-row:hover {
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000;
    top: -3px;
    left: -3px;
}
#orbit-lock-row .checkbox { margin-right: 10px; }

/* ── Weekly count input ── */
#weekly-count-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

#weekly-count-input {
    width: 70px;
    text-align: center;
    font-size: 13px;
    box-sizing: border-box;
}

#weekly-count-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555;
    white-space: nowrap;
}

/* ── Due date picker ── */
.deadline-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: "Open Sans", sans-serif;
    letter-spacing: 2px;
    transition: border 0.15s, box-shadow 0.15s, top 0.15s, left 0.15s;
    top: 0;
    left: 0;
}

.deadline-wrapper:hover {
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000;
    top: -3px;
    left: -3px;
}

.deadline-wrapper.has-date {
    border: 2px solid #000;
}

.deadline-label {
    font-size: 13px;
    color: #000;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
}

.deadline-arrow {
    font-size: 10px;
    color: #000;
    pointer-events: none;
}

.deadline-wrapper input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: none;
    background: transparent;
}

#create-orbit-form textarea.brutalist-input {
    resize: none;
    height: 80px;
}

#create-orbit-form .dropdown-trigger {
    border: 1px solid #ccc;
    box-shadow: none;
    background: #fff;
    color: #000;
    position: relative;
    top: 0;
    left: 0;
    transition: border 0.15s, box-shadow 0.15s, top 0.15s, left 0.15s;
}

#create-orbit-form .dropdown-trigger:hover,
#create-orbit-form .dropdown.is-open .dropdown-trigger {
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000;
    top: -3px;
    left: -3px;
    background: #fff;
    color: #000;
}

#create-orbit-form .dropdown.is-open {
    z-index: 50;
}

#create-orbit-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    overflow: visible;
}

#create-orbit-filters .filter-cell {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
#create-orbit-filters .filter-lock-row { flex-shrink: 0; display: flex; }
#create-orbit-filters .checkbox.filter-lock { margin-right: 2px; }
#create-orbit-filters .filter-lock-row .tooltip-text {
    white-space: normal;
    width: 160px;
    text-align: left;
    bottom: auto;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 8px;
    z-index: 200;
}
#create-orbit-filters .dropdown { flex: 1; min-width: 0; }

#location .dropdown { width: 100%; }

/* ── Review proposed changes popup ──────────────────────── */
#review-changes-popup-content {
    width: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    max-width: unset;
}
#review-changes-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
}
#review-changes-popup-header h3 { margin: 0; }
#review-changes-popup-close { cursor: pointer; font-size: 18px; line-height: 1; }
#review-changes-intro { padding: 14px 14px 0; margin: 0; font-size: 13px; }
#review-changes-list {
    padding: 6px 14px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}
.rc-row:last-child { border-bottom: none; }
.rc-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    min-width: 110px;
    flex-shrink: 0;
    padding-top: 3px;
}
.rc-values {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    flex: 1;
}
.rc-tag {
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid #ccc;
    color: #444;
}
.rc-arrow {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    align-self: center;
}
#review-changes-buttons {
    padding: 0 14px 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ── Pending changes label ───────────────────────────────── */
.orbit-pending-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    align-self: center;
}

/* ── Delete orbit confirmation popup ────────────────────── */
#delete-orbit-popup-content {
    width: 340px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    max-width: unset;
}
#delete-orbit-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
}
#delete-orbit-popup-header h3 { margin: 0; }
#delete-orbit-popup-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
#delete-orbit-popup-message {
    padding: 14px;
    font-size: 13px;
    margin: 0;
}
#delete-orbit-popup-buttons {
    padding: 0 14px 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ── Applicant select popup ─────────────────────────────── */
#select-creator-popup-content {
    width: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    max-width: unset;
}

#select-creator-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
}

#select-creator-popup-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#select-creator-popup-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

#select-creator-popup-buttons {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Review popup ───────────────────────────────────────── */
#reviewpopup-content {
    width: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    max-width: unset;
}

#reviewpopup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #000;
}

#reviewpopup-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#reviewpopup-header span {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

#reviewpopup-content > p {
    padding: 14px 14px 0;
    margin: 0;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

#star-ranking-array {
    display: flex;
    gap: 8px;
    padding: 14px;
}

.star {
    width: 36px;
    height: 36px;
    background: #ccc;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%,
        68% 57%, 79% 91%, 50% 70%,
        21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
    cursor: pointer;
    transition: background 0.1s;
}
.star:hover, .star.lit { background: var(--textColor); }

#reviewpopup-content textarea.brutalist-input {
    margin: 0 14px;
    width: calc(100% - 28px);
    box-sizing: border-box;
    resize: none;
    height: 80px;
    font-size: 13px;
    font-weight: normal;
}

#reviewpopup-content .button {
    margin: 14px;
    align-self: flex-start;
}

/* ── Checkboxes ─────────────────────────────────────────── */
.checkbox {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 2px solid #000;
    margin-right: 8px;
    cursor: pointer;
    background: white;
    flex-shrink: 0;
    transition: background 0.1s;
}

.checkbox.selected { background: #000; }

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.dropdown-option:last-child { border-bottom: none; }
.dropdown-option:hover { background: #f5f5f5; }

/* ── Confirm popup ──────────────────────────────────────── */
.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.confirm-modal .confirm-modal-content {
    margin: 0;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow: visible;
    padding: 28px 32px;
    box-sizing: border-box;
    text-align: center;
    background: white;
    border: 3px solid #000;
    box-shadow: 8px 8px 0 #000;
}

.confirm-modal-header {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.confirm-modal-body {
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.6;
    max-width: 240px;
}

.confirm-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* ── Payment confirm popup (A4 ratio) ────────────────────── */
#pay-confirm-box {
    align-items: stretch;
    text-align: left;
    width: 420px;
    height: calc(420px * 1.4142);
    padding: 0;
    gap: 0;
}
#pay-confirm-box .confirm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 2px solid #000;
    flex-shrink: 0;
}
#pay-confirm-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
#pay-confirm-orbit-title {
    font-size: 18px;
    font-weight: 700;
    padding: 28px 24px 8px;
    letter-spacing: 0;
    text-transform: none;
    flex-shrink: 0;
}
#pay-step-breakdown,
#pay-step-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#pay-confirm-breakdown {
    display: flex;
    flex-direction: column;
    padding: 16px 24px 0;
    gap: 0;
}
.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: normal;
}
.pay-row:last-child { border-bottom: none; }
.pay-row-total { font-weight: 700; font-size: 16px; }
.pay-label { color: #555; }
.pay-rate {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-left: 6px;
}
.pay-value { font-weight: 600; }
.pay-fee { color: #c00; }
.pay-row-total { border-top: 2px solid #000; border-bottom: none; padding-top: 16px; }
#pay-card-total-wrap { padding: 0 24px; }
.pay-card-total { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; letter-spacing: 0; text-transform: none; border-top: 2px solid #000; padding-top: 16px; padding-bottom: 8px; margin-top: 8px; }
.pay-creator { color: #007a3d; font-weight: 700; }
#pay-confirm-box .confirm-modal-actions {
    padding: 16px 24px 24px;
    justify-content: flex-end;
    margin-top: 0;
    flex-shrink: 0;
}

/* ── Card selector ───────────────────────────────────────── */
#pay-card-select {
    padding: 16px 24px;
}
#pay-card-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.pay-card-select-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
}
.pay-refresh-link {
    background: none;
    border: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}
.pay-refresh-link:hover { color: #000; }
#pay-no-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pay-add-card-link {
    background: none;
    border: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    cursor: pointer;
    padding: 6px 0 0;
    font-family: inherit;
    text-align: left;
    text-decoration: underline;
}
.pay-add-card-link:hover { color: #000; }
#pay-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pay-card-loading {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pay-card-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: border-color 0.1s;
}
.pay-card-option:hover { border-color: #000; }
.pay-card-option.pay-card-selected { border: 2px solid #000; }
.pay-card-radio {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 2px solid #000;
    border-radius: 50%;
    background: white;
    transition: background 0.1s;
}
.pay-card-selected .pay-card-radio { background: #000; }
.pay-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.pay-card-brand {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 11px;
    min-width: 60px;
}
.pay-card-last4 {
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #000;
}
.pay-card-email {
    font-size: 12px;
    color: #555;
}
.pay-card-exp {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

@media (max-width: 1000px) {
    #orbit-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    #orbit-layout {
        padding: 0 10px 20px 10px;
    }
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
    body { overflow: auto; }

    #orbit-layout {
        grid-template-columns: 1fr;
        overflow: visible;
        padding: 0 10px 20px;
    }

    #orbit-sidebar.board,
    #orbit-main.board {
        overflow: visible;
    }

    #orbit-sidebar {
        max-height: 280px;
    }

    #orbit-main {
        overflow: visible;
        min-height: 400px;
    }

    #orbit-detail {
        overflow: visible;
    }

    #orbit-detail-body {
        overflow: visible;
    }

    .orbit-criteria-grid {
        grid-template-columns: 1fr;
    }

    #create-orbit-modal-content {
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

    #create-orbit-filters {
        grid-template-columns: 1fr;
    }

    #reviewpopup-content {
        width: 90vw;
    }

    #select-creator-popup-content {
        width: 90vw;
    }

    .confirm-modal .confirm-modal-content {
        width: 90vw;
    }

    /* Sidebar items */
    .orbit-sidebar-item {
        padding: 16px 12px;
        min-height: 52px;
    }

    .orbit-item-title {
        font-size: 13px;
    }

    .orbit-group-header {
        padding: 12px 12px;
        font-size: 13px;
        min-height: 44px;
    }

    /* Detail */
    #orbit-detail-header h3 {
        font-size: 16px;
    }

    .orbit-description {
        font-size: 15px;
        line-height: 1.8;
    }

    .orbit-criteria-label {
        font-size: 11px;
    }

    .orbit-criteria-value {
        font-size: 14px;
    }

    /* Action bar */
    #orbit-action-bar {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    #orbit-action-bar .button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Applicant cards */
    #orbit-applicants-list .search-card {
        padding: 14px;
        min-height: 60px;
    }

    #orbit-applicants-list .search-card-avatar {
        width: 48px;
        height: 48px;
    }

    #orbit-applicants-list .search-card-name {
        font-size: 15px;
    }

    /* Modal inputs */
    #create-orbit-form .brutalist-input {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }

    #sumbit-orbit-button {
        width: 100%;
        min-height: 50px;
        font-size: 15px;
        text-align: center;
        justify-content: center;
    }

    /* Select creator popup */
    #select-creator-popup-buttons .button {
        width: 100%;
        min-height: 50px;
        text-align: center;
        justify-content: center;
    }
}

