.dkp-page {
    padding: 2.5rem 0 4rem;
    color: #172033;
}

.dkp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.dkp-intro {
    max-width: 680px;
    color: #4b5566;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.dkp-slate-meta {
    font-weight: 600;
    color: #ff6b35;
    white-space: nowrap;
    text-align: right;
}

.dkp-explainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.dkp-explainer-item h2 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: #172033;
}

.dkp-explainer-item p {
    color: #4b5566;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dkp-faq {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e4ec;
    max-width: 760px;
}

.dkp-faq h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.dkp-faq-item {
    border-bottom: 1px solid #eef0f5;
    padding: 0.85rem 0;
}

.dkp-faq-item summary {
    font-weight: 700;
    cursor: pointer;
    color: #172033;
}

.dkp-faq-item summary::marker {
    color: #ff6b35;
}

.dkp-faq-item p {
    margin-top: 0.6rem;
    color: #4b5566;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dkp-slate-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.dkp-slate-selector-loading {
    color: #717a89;
    font-size: 0.9rem;
}

.dkp-slate-option {
    display: block;
    border: 1px solid #d6dae3;
    border-radius: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #fff;
    cursor: pointer;
    min-width: 150px;
}

.dkp-slate-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dkp-slate-option-time {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: #172033;
}

.dkp-slate-option-games {
    display: block;
    font-size: 0.78rem;
    color: #717a89;
}

.dkp-slate-option.is-selected {
    border-color: #ff6b35;
    background: #fff4ee;
}

.dkp-slate-option.is-selected .dkp-slate-option-time {
    color: #ff6b35;
}

.dkp-slate-selector.is-loading .dkp-slate-option:not(.is-selected) {
    opacity: 0.5;
    pointer-events: none;
}

.dkp-slate-selector.is-loading .dkp-slate-option.is-selected {
    cursor: wait;
}

.dkp-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(23, 32, 51, 0.15);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: dkp-spin 0.7s linear infinite;
    vertical-align: middle;
}

.dkp-spinner--inline {
    width: 0.7rem;
    height: 0.7rem;
    margin-left: 0.4rem;
}

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

/* Two-column layout: pool (left) + lineup sidebar (right) */
.dkp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

/* --- Pool column (left) --- */
.dkp-pool-search input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d6dae3;
    border-radius: 0.45rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.dkp-pos-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.dkp-pos-tab {
    padding: 0.45rem 0.9rem;
    border: 1px solid #d6dae3;
    background: #fff;
    border-radius: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    color: #4b5566;
}

.dkp-pos-tab.is-active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

.dkp-pool-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e4ec;
    border-radius: 0.6rem;
}

.dkp-pool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.dkp-pool-table th,
.dkp-pool-table td {
    padding: 0.5rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid #eef0f5;
    white-space: nowrap;
}

.dkp-pool-table td.dkp-pool-loading {
    text-align: center;
    padding: 2.5rem 0;
    color: #717a89;
    white-space: normal;
}

.dkp-pool-table td.dkp-pool-loading .dkp-spinner {
    margin-right: 0.5rem;
}

.dkp-pool-table thead th {
    background: #f6f7fa;
    color: #4b5566;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.dkp-pool-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.dkp-pool-table th[data-sort]:hover {
    color: #ff6b35;
}

.dkp-row-out {
    opacity: 0.55;
}

.dkp-row-selected {
    background: #fff4ee;
}

.dkp-status-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    background: #fde3e3;
    color: #b43a3a;
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: 0.3rem;
}

.dkp-win-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.3rem;
    border-radius: 0.3rem;
    background: #e7f6ec;
    color: #2f9e58;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: help;
}

.dkp-win-badge--dog {
    background: #f6f1e9;
    color: #8a6a2f;
}

.dkp-trend-badge {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: help;
}

.dkp-trend-up {
    color: #2f9e58;
}

.dkp-trend-down {
    color: #d64545;
}

.dkp-b2b-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
    background: #fff0e0;
    color: #b5651d;
    font-size: 0.64rem;
    font-weight: 700;
    margin-left: 0.3rem;
    cursor: help;
}

.dkp-pool-add {
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    border: 1px solid #d6dae3;
    border-radius: 0.35rem;
    background: #fff;
    cursor: pointer;
}

.dkp-pool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.dkp-auto-advance {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #4b5566;
}

.dkp-pool-footer select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d6dae3;
    border-radius: 0.4rem;
    font-size: 0.85rem;
}

/* --- Lineup sidebar (right) --- */
.dkp-lineup-panel {
    border: 1px solid #e0e4ec;
    border-radius: 0.6rem;
    overflow: hidden;
    background: #fff;
}

.dkp-lineup-header {
    background: #172033;
    color: #fff;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dkp-lineup-title {
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.dkp-lineup-stat {
    font-size: 0.78rem;
    color: #c7ccd6;
}

.dkp-lineup-stat strong {
    color: #ff6b35;
}

.dkp-lineup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.6rem 0.9rem 0;
}

.dkp-lineup-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid #d6dae3;
    border-radius: 0.35rem;
    background: #fff;
    color: #4b5566;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.dkp-lineup-tab.is-active {
    background: #172033;
    border-color: #172033;
    color: #fff;
}

.dkp-lineup-tab-remove {
    opacity: 0.7;
    font-weight: 400;
}

.dkp-lineup-tab-remove:hover {
    opacity: 1;
}

.dkp-lineup-tab-add {
    padding: 0.3rem 0.6rem;
    border: 1px dashed #d6dae3;
    border-radius: 0.35rem;
    background: #fff;
    color: #717a89;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.dkp-lineup-tab-add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dkp-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.dkp-roster-table thead th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    background: #f6f7fa;
    color: #4b5566;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #eef0f5;
}

.dkp-slot td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #eef0f5;
    vertical-align: middle;
}

.dkp-slot-pos {
    font-weight: 800;
    color: #ff6b35;
    width: 2.6rem;
}

.dkp-slot-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.dkp-slot-empty {
    color: #9aa3b2;
    font-size: 0.82rem;
}

.dkp-slot-name {
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dkp-slot-meta {
    font-size: 0.76rem;
    color: #717a89;
    white-space: nowrap;
}

.dkp-slot-salary {
    font-size: 0.8rem;
    color: #4b5566;
    white-space: nowrap;
}

.dkp-slot-remove {
    border: none;
    background: transparent;
    color: #d64545;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.dkp-validation {
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #4b5566;
    border-top: 1px solid #eef0f5;
}

.dkp-validation--error {
    color: #d64545;
}

.dkp-validation--success {
    color: #2f9e58;
}

.dkp-optimize-btn {
    display: block;
    width: calc(100% - 1.8rem);
    margin: 0 0.9rem 0.6rem;
    padding: 0.75rem;
    border: none;
    border-radius: 0.4rem;
    background: #ff6b35;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 0.9rem;
    cursor: pointer;
}

.dkp-optimize-btn:disabled {
    background: #ffc9ad;
    cursor: not-allowed;
}

.dkp-save-btn {
    display: block;
    width: calc(100% - 1.8rem);
    margin: 0 0.9rem 0.6rem;
    padding: 0.75rem;
    border: none;
    border-radius: 0.4rem;
    background: #2f9e58;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 0.9rem;
    cursor: pointer;
}

.dkp-save-btn:disabled {
    background: #a9c9b4;
    cursor: not-allowed;
}

.dkp-clear-link {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: #717a89;
    font-size: 0.85rem;
    padding: 0 0 0.9rem;
    cursor: pointer;
}

.dkp-export-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #717a89;
    line-height: 1.55;
}

.dkp-export-note code {
    background: #f1f3f8;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

@media (max-width: 900px) {
    .dkp-layout {
        grid-template-columns: 1fr;
    }

    .dkp-lineup-col {
        order: -1;
    }
}
