.jt-applications {
    --jt-apps-border: #e2e8f0;
    --jt-apps-surface: #ffffff;
    --jt-apps-muted: #64748b;
    min-width: 0;
    max-width: 100%;
}

html[data-theme="light"] .jt-applications {
    --jt-apps-border: #e2e8f0;
    --jt-apps-surface: #ffffff;
}

html[data-theme="dark"] .jt-applications {
    --jt-apps-border: rgba(148, 163, 184, 0.16);
    --jt-apps-surface: #141826;
    --jt-apps-muted: #94a3b8;
}

.jt-apps-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.jt-apps-head-copy {
    min-width: 0;
    flex: 1 1 18rem;
}

.jt-apps-head-metrics {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.jt-apps-metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 8.5rem;
    padding: 10px 14px;
    border: 1px solid var(--jt-apps-border);
    border-radius: 16px;
    background: var(--jt-apps-surface);
    box-shadow: 0 1px 0 rgb(15 23 42 / 3%);
}

.jt-apps-metric-label {
    color: var(--jt-apps-muted);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.jt-apps-metric-value {
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.jt-apps-range {
    min-width: 11rem;
    max-width: 14rem;
}

.jt-apps-toolbar {
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 14px;
    position: relative;
    z-index: 6;
    overflow: visible;
}

.jt-apps-toolbar-filters,
.jt-apps-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.jt-apps-toolbar-filters {
    flex: 1 1 36rem;
}

.jt-apps-toolbar-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-left: auto;
}

.jt-applications .jt-apps-search {
    flex: 1 1 18rem;
    max-width: 28rem;
    min-width: min(100%, 16rem);
}

.jt-applications .jt-filter-field {
    flex: 0 1 11rem;
    max-width: 14rem;
    min-width: 9.5rem;
}

.jt-applications .jt-apps-select {
    max-width: 11.5rem;
}

.jt-applications .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px;
}

.jt-applications .jt-apps-more,
.jt-applications .jt-apps-more .mud-menu-button-activator,
.jt-applications .jt-apps-add,
.jt-apps-toolbar-actions > .mud-button {
    border-radius: 999px !important;
    text-transform: none !important;
}

.jt-applications .jt-applications-view {
    display: inline-grid;
    align-items: stretch;
    width: auto;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--jt-apps-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--jt-apps-surface) 88%, transparent);
    box-shadow: none;
}

.jt-applications .jt-applications-view .mud-toggle-item,
.jt-applications .jt-applications-view .mud-button {
    min-width: 0;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    text-transform: none !important;
}

.jt-applications .jt-applications-view .mud-toggle-item.mud-selected,
.jt-applications .jt-applications-view .mud-toggle-item-selected,
.jt-applications .jt-applications-view .mud-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent) !important;
    color: var(--mud-palette-text-primary) !important;
}

html[data-theme="dark"] .jt-applications .jt-applications-view .mud-toggle-item.mud-selected,
html[data-theme="dark"] .jt-applications .jt-applications-view .mud-toggle-item-selected,
html[data-theme="dark"] .jt-applications .jt-applications-view .mud-selected {
    background: rgba(139, 92, 246, 0.38) !important;
    color: #f5f3ff !important;
}

.jt-applications .jt-stage-row {
    margin-bottom: 14px;
}

.jt-applications .jt-apps-summary-loading {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.jt-applications .jt-board-loading {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 12px;
    overflow-x: auto;
}

.jt-applications .jt-board-loading-col {
    min-width: 140px;
    border-radius: 16px;
}

.jt-applications .jt-apps-loading {
    min-height: 280px;
}

@media (max-width: 960px) {
    .jt-applications .jt-apps-summary-loading {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .jt-applications .jt-board-loading {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

.jt-applications .jt-stage-row .jt-stage {
    min-height: 84px;
    padding: 12px 14px;
    border-radius: 16px;
}

.jt-applications .jt-board-column-head.jt-stage {
    min-height: 0;
    padding: 10px 8px 8px 10px;
}

.jt-applications .jt-board-wrap {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.jt-applications .jt-table-wrap,
.jt-applications .application-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.jt-applications.jt-page-fill .mud-table-container {
    height: auto !important;
    max-height: calc(100dvh - 320px) !important;
}

.jt-table-company {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.jt-table-company .jt-company-mark {
    flex: none;
}

.jt-table-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.jt-apps-manage {
    border-radius: 12px !important;
    text-transform: none !important;
}

.jt-apps-more-popover {
    z-index: 2000 !important;
}

.jt-manage-board-dialog {
    max-width: 22rem;
}

.jt-manage-board-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jt-manage-board-kicker {
    color: var(--mud-palette-text-secondary);
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.jt-manage-board-head strong {
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.jt-manage-board-lead {
    margin: 0 0 16px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.88rem;
}

.jt-manage-board-group {
    display: grid;
    gap: 2px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--jt-apps-border, #e2e8f0);
    border-radius: 14px;
    background: color-mix(in srgb, var(--jt-apps-surface, #fff) 88%, transparent);
}

.jt-manage-board-group h3 {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

html[data-theme="dark"] .jt-manage-board-group {
    border-color: rgba(148, 163, 184, 0.16);
    background: #141826;
}

.jt-applications .application-table .mud-paper,
.jt-applications .application-table {
    background: var(--jt-apps-surface);
    border: 1px solid var(--jt-apps-border);
    border-radius: 18px;
    box-shadow: none;
}

html[data-theme="light"] .jt-app .jt-nav-menu .mud-nav-link.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, #fff) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}

html[data-theme="light"] .jt-app .mud-main-content.jt-main {
    background: #f3f5f9;
}

html[data-theme="dark"] .jt-apps-metric {
    background: #141826;
    box-shadow: none;
}

html[data-theme="dark"] .jt-applications .jt-filter-field .mud-input-outlined .mud-input-outlined-border,
html[data-theme="dark"] .jt-apps-range .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

@media (max-width: 1024px) {
    .jt-apps-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .jt-applications .jt-apps-search {
        max-width: none;
        flex-basis: 100%;
    }
}

@media (max-width: 768px) {
    .jt-apps-head {
        margin-bottom: 14px;
    }

    .jt-apps-metric,
    .jt-apps-range {
        width: 100%;
        max-width: none;
    }

    .jt-applications .jt-filter-field,
    .jt-applications .jt-apps-select {
        flex: 1 1 calc(50% - 8px);
        max-width: none;
    }

    .jt-applications.jt-page-fill .mud-table-container {
        max-height: calc(100dvh - 420px) !important;
    }
}

html[data-theme="light"] .status-chip {
    border-radius: 999px !important;
}

html[data-theme="light"] .status-chip-saved {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #fde68a !important;
}

html[data-theme="light"] .status-chip-applied {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
    border-color: #bfdbfe !important;
}

html[data-theme="light"] .status-chip-interview {
    color: #6d28d9 !important;
    background: #ede9fe !important;
    border-color: #ddd6fe !important;
}

html[data-theme="light"] .status-chip-offer {
    color: #047857 !important;
    background: #d1fae5 !important;
    border-color: #a7f3d0 !important;
}

html[data-theme="light"] .status-chip-rejected {
    color: #b91c1c !important;
    background: #fee2e2 !important;
    border-color: #fecaca !important;
}

html[data-theme="light"] .status-chip-withdrawn {
    color: #334155 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="dark"] .status-chip-saved {
    color: #fde68a !important;
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
}

html[data-theme="dark"] .status-chip-applied {
    color: #93c5fd !important;
    background: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.28) !important;
}

html[data-theme="dark"] .status-chip-interview {
    color: #ddd6fe !important;
    background: rgba(139, 92, 246, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

html[data-theme="dark"] .status-chip-offer {
    color: #86efac !important;
    background: rgba(34, 197, 94, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
}

html[data-theme="dark"] .status-chip-rejected {
    color: #fda4af !important;
    background: rgba(244, 63, 94, 0.16) !important;
    border-color: rgba(244, 63, 94, 0.28) !important;
}

html[data-theme="dark"] .status-chip-withdrawn {
    color: #e2e8f0 !important;
    background: rgba(148, 163, 184, 0.14) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

.jt-applications .status-chip {
    position: relative;
    overflow: visible !important;
    border-radius: 999px !important;
}

.jt-applications .status-chip-saved {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #f59e0b 35%, transparent),
        0 0 12px color-mix(in srgb, #f59e0b 38%, transparent) !important;
}

.jt-applications .status-chip-applied {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #3b82f6 35%, transparent),
        0 0 12px color-mix(in srgb, #3b82f6 38%, transparent) !important;
}

.jt-applications .status-chip-interview {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #8b5cf6 40%, transparent),
        0 0 12px color-mix(in srgb, #8b5cf6 42%, transparent) !important;
}

.jt-applications .status-chip-offer {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #22c55e 35%, transparent),
        0 0 12px color-mix(in srgb, #22c55e 38%, transparent) !important;
}

.jt-applications .status-chip-rejected {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #f43f5e 35%, transparent),
        0 0 12px color-mix(in srgb, #f43f5e 38%, transparent) !important;
}

.jt-applications .status-chip-withdrawn {
    box-shadow:
        0 0 0 1px color-mix(in srgb, #94a3b8 30%, transparent),
        0 0 10px color-mix(in srgb, #94a3b8 28%, transparent) !important;
}

.jt-applications .jt-stage-row .jt-stage.status-saved { --jt-stage-glow: #f59e0b; }
.jt-applications .jt-stage-row .jt-stage.status-applied { --jt-stage-glow: #3b82f6; }
.jt-applications .jt-stage-row .jt-stage.status-interview { --jt-stage-glow: #8b5cf6; }
.jt-applications .jt-stage-row .jt-stage.status-offer { --jt-stage-glow: #22c55e; }
.jt-applications .jt-stage-row .jt-stage.status-rejected { --jt-stage-glow: #f43f5e; }
.jt-applications .jt-stage-row .jt-stage.status-withdrawn { --jt-stage-glow: #94a3b8; }

.jt-applications .jt-stage-row .jt-stage {
    position: relative;
    overflow: visible;
}

.jt-applications .jt-stage-row .jt-stage::before {
    content: "";
    position: absolute;
    top: 0;
    right: 14px;
    left: 14px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--jt-stage-glow, var(--mud-palette-primary));
    box-shadow:
        0 0 10px var(--jt-stage-glow, var(--mud-palette-primary)),
        0 0 18px color-mix(in srgb, var(--jt-stage-glow, var(--mud-palette-primary)) 70%, transparent);
    pointer-events: none;
}

html[data-theme="dark"] .jt-applications .mud-popover,
html[data-theme="dark"] .jt-apps-range .mud-popover {
    background: #141826;
}

.jt-applications .jt-applications-view .mud-selected,
.jt-applications .jt-applications-view .mud-toggle-item-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent) !important;
}

.jt-archive-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #e8eaee;
    color: #334155;
}

.jt-archive-banner-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jt-archive-banner-copy strong {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.jt-archive-banner-copy span {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
}

.jt-applications .jt-archive-back {
    border-radius: 12px !important;
    text-transform: none !important;
}

html[data-theme="dark"] .jt-archive-banner {
    border-color: rgba(148, 163, 184, 0.28);
    background: #1c2030;
    color: #cbd5e1;
}

html[data-theme="dark"] .jt-archive-banner-copy strong {
    color: #94a3b8;
}

html[data-theme="dark"] .jt-archive-banner-copy span {
    color: #e2e8f0;
}

.jt-applications.is-archive .jt-board-wrap,
.jt-applications.is-archive .jt-table-wrap,
.jt-applications.is-archive .application-table-wrapper {
    filter: grayscale(1);
}

.jt-applications.is-archive .jt-board-card,
.jt-applications.is-archive .jt-board-column,
.jt-applications.is-archive .application-table .mud-table-row td {
    opacity: 0.9;
}

.jt-applications.is-archive .jt-board-column-head.jt-stage::before,
.jt-applications.is-archive .jt-board-card::after,
.jt-applications.is-archive .jt-stage-row .jt-stage::before {
    background: #94a3b8 !important;
    box-shadow: none !important;
}

@media (max-width: 430px) {
    .jt-applications .jt-filter-field,
    .jt-applications .jt-apps-select,
    .jt-apps-toolbar-actions .mud-button,
    .jt-applications .jt-applications-view {
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
    }
}
