/* Awards planner - compact category table + manual override editor */

.awards-page {
    width: 100%;
    color: #263238;
    font-size: 13px;
}

.awards-page * {
    box-sizing: border-box;
}

.awards-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.awards-page-title {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.awards-page-description {
    max-width: 960px;
    color: #65737e;
    line-height: 1.45;
}

.awards-save-all {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 18px;
    border: 1px solid #2f6fa8;
    border-radius: 6px;
    background: #397fb8;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.awards-save-all:hover {
    background: #2f6fa8;
}

.awards-save-all:disabled {
    cursor: default;
    opacity: .6;
}

.awards-page-alert {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 6px;
}

.awards-page-alert-error {
    border: 1px solid #dca2a2;
    background: #fff2f2;
    color: #8c3131;
}

.awards-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d9e0e5;
    border-radius: 8px;
    background: #fff;
}

.awards-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.awards-table th,
.awards-table td {
    border-right: 1px solid #e2e7eb;
    border-bottom: 1px solid #e2e7eb;
    vertical-align: top;
}

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

.awards-table tbody tr:last-child td {
    border-bottom: 0;
}

.awards-table thead th {
    padding: 10px 8px;
    background: #f3f6f8;
    color: #45545f;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

.awards-col-category { width: 190px; }
.awards-col-stats { width: 145px; }
.awards-col-cups { width: 180px; }
.awards-col-team { width: 165px; }
.awards-col-quantity { width: 245px; }

.awards-table thead th:nth-last-child(-n+7) {
    width: 76px;
}

.awards-main-row td {
    padding: 10px;
    background: #fff;
}

.awards-main-row:nth-child(even) td {
    background: #fbfcfd;
}

.awards-other-row td:first-child {
    border-left: 4px solid #8aa8bf;
}

.awards-name-cell {
    vertical-align: middle !important;
}

.awards-main-name {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    color: #243746;
}

.awards-row-group-label {
    margin-bottom: 3px;
    color: #6b7f8d;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.awards-save-status {
    min-height: 16px;
    margin-top: 5px;
    color: #8a98a3;
    font-size: 10px;
}

.awards-save-status.is-saving {
    color: #a66b17;
}

.awards-save-status.is-saved {
    color: #3e7c59;
}

.awards-save-status.is-error {
    color: #b23b3b;
}

.awards-stats-cell {
    vertical-align: middle !important;
    text-align: center;
}

.awards-stat-main {
    color: #263238;
    font-size: 16px;
    font-weight: 700;
}

.awards-stat-main span,
.awards-stat-sub {
    color: #73838e;
    font-size: 10px;
    font-weight: 400;
}

.awards-stat-sub {
    margin-top: 3px;
    line-height: 1.25;
}

.awards-setting-cell {
    vertical-align: middle !important;
}

.awards-control {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #c9d3da;
    border-radius: 5px;
    background: #fff;
    color: #263238;
    font-size: 12px;
}

.awards-control:focus,
.awards-number-field input:focus {
    outline: none;
    border-color: #6a9fc8;
    box-shadow: 0 0 0 2px rgba(77,137,184,.12);
}

.awards-control:disabled,
.awards-number-field input:disabled {
    border-color: #e1e6e9;
    background: #f3f5f6;
    color: #a2abb1;
    cursor: not-allowed;
}

.awards-control-hint {
    margin-top: 4px;
    color: #8b989f;
    font-size: 9px;
    line-height: 1.25;
}

.awards-not-applicable {
    padding: 8px 0;
    color: #a7b0b6;
    text-align: center;
}

.awards-quantity-cell {
    padding: 5px !important;
}

.awards-quantity-control {
    min-width: 0;
}

.awards-all-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-height: 28px;
    margin-bottom: 4px;
    padding: 4px 6px;
    border: 1px solid #c5d0d7;
    border-radius: 6px;
    background: #f5f7f8;
    color: #697983;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: .15s ease;
}

.awards-all-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.awards-all-toggle-box {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 14px;
    border-radius: 8px;
    background: #bcc6cc;
    transition: .15s ease;
}

.awards-all-toggle-box:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.18);
    transition: .15s ease;
}

.awards-all-toggle.is-active {
    border-color: #57956e;
    background: #eef8f1;
    color: #326846;
}

.awards-all-toggle.is-active .awards-all-toggle-box {
    background: #57956e;
}

.awards-all-toggle.is-active .awards-all-toggle-box:after {
    left: 16px;
}

.awards-all-toggle.is-control-disabled {
    border-color: #e2e6e8;
    background: #f4f5f6;
    color: #b2b9bd;
    cursor: not-allowed;
    opacity: .68;
}

.awards-all-toggle.is-control-disabled .awards-all-toggle-box {
    background: #d7dde0;
}

.awards-depth-settings.is-disabled {
    opacity: .44;
}

.awards-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    margin-bottom: 4px;
}

.awards-mode-option {
    margin: 0;
    cursor: pointer;
}

.awards-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.awards-mode-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 28px;
    padding: 2px 5px;
    border: 1px solid #cbd5db;
    background: #f7f9fa;
    color: #60727d;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
}

.awards-mode-option:first-child span {
    border-radius: 6px 0 0 6px;
}

.awards-mode-option:last-child span {
    margin-left: -1px;
    border-radius: 0 6px 6px 0;
}

.awards-mode-option input:checked + span {
    position: relative;
    z-index: 1;
    border-color: #608fb5;
    background: #eaf3fa;
    color: #2f678f;
}

.awards-mode-option input:disabled + span {
    border-color: #e1e6e9;
    background: #f2f4f5;
    color: #b1b8bc;
    cursor: not-allowed;
}

.awards-number-field {
    display: grid;
    grid-template-columns: minmax(0,1fr) 46px;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #657782;
    font-size: 9px;
    line-height: 1.05;
}

.awards-number-field-wide {
    margin-bottom: 4px;
}

.awards-number-field input {
    width: 100%;
    height: 26px;
    padding: 2px 4px;
    border: 1px solid #c9d3da;
    border-radius: 5px;
    background: #fff;
    text-align: center;
    font-weight: 700;
}

.awards-threshold-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.awards-threshold-grid .awards-number-field {
    grid-template-columns: minmax(0,1fr) 38px;
}

.awards-fixed-panel.is-hidden,
.awards-threshold-panel.is-hidden,
.awards-override-editor.is-hidden,
.awards-selector-field.is-hidden {
    display: none !important;
}

.awards-result-cell {
    padding: 13px 6px !important;
    vertical-align: middle !important;
    color: #31434e;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.awards-empty-table {
    padding: 28px !important;
    color: #7b8992;
    text-align: center;
}

/* Manual override editor */
.awards-override-builder {
    width: 840px;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #d4dde3;
    border-radius: 8px;
    background: #f8fafb;
}

.awards-override-builder-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.awards-override-builder h3 {
    margin: 0 0 3px;
    color: #2d4657;
    font-size: 18px;
}

.awards-override-description {
    color: #73838d;
    font-size: 11px;
}

.awards-override-selectors {
    display: grid;
    grid-template-columns: repeat(4,minmax(140px,1fr));
    gap: 8px;
    width: 100%;
}

.awards-selector-field {
    display: block;
    margin: 0;
}

.awards-selector-field > span {
    display: block;
    margin-bottom: 4px;
    color: #60727d;
    font-size: 10px;
    font-weight: 700;
}

.awards-override-editor {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #cbd9e2;
    border-radius: 7px;
    background: #fff;
}

.awards-override-path {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    color: #70808a;
    font-size: 11px;
}

.awards-override-path strong {
    color: #263f50;
    font-size: 14px;
}

.awards-override-master-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border: 1px solid #adbac3;
    border-radius: 6px;
    background: #f2f5f7;
    color: #526773;
    font-weight: 700;
    cursor: pointer;
}

.awards-override-master-toggle input {
    position: absolute;
    opacity: 0;
}

.awards-override-master-box {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: 10px;
    background: #bcc6cc;
}

.awards-override-master-box:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transition: .15s ease;
}

.awards-override-master-toggle input:checked + .awards-override-master-box {
    background: #4f8cb8;
}

.awards-override-master-toggle input:checked + .awards-override-master-box:after {
    left: 18px;
}

.awards-override-settings-grid {
    display: grid;
    grid-template-columns: minmax(180px,.85fr) minmax(180px,.85fr) minmax(320px,1.8fr);
    gap: 12px;
}

.awards-override-setting-block {
    padding: 11px;
    border: 1px solid #e0e6ea;
    border-radius: 6px;
    background: #fbfcfd;
}

.awards-override-setting-block h4 {
    margin: 0 0 7px;
    color: #536976;
    font-size: 11px;
}

.awards-override-setting-block.is-not-applicable {
    opacity: .42;
}

.awards-override-settings.is-settings-disabled .awards-override-setting-block {
    opacity: .48;
}

.awards-override-status {
    margin-top: 8px;
}

/* Summary */
.awards-summary-section {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #d9e1e6;
    border-radius: 8px;
    background: #fff;
}

.awards-summary-section > h3 {
    margin: 0 0 12px;
    color: #2d4657;
    font-size: 18px;
}

.awards-summary-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
}

.awards-summary-block {
    padding: 12px;
    border: 1px solid #e0e6ea;
    border-radius: 6px;
    background: #fafcfd;
}

.awards-summary-block h4 {
    margin: 0 0 8px;
    color: #536976;
    font-size: 12px;
}

.awards-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #edf0f2;
    font-size: 11px;
}

.awards-summary-line:last-child {
    border-bottom: 0;
}

.awards-summary-line strong {
    color: #253e4f;
    font-size: 13px;
}

.awards-summary-total {
    margin-top: 4px;
    padding-top: 7px;
    border-top: 1px solid #ced9df;
    border-bottom: 0;
    font-weight: 700;
}

.awards-summary-empty {
    padding: 6px 0;
    color: #9aa5ab;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .awards-summary-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .awards-override-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
    .awards-override-quantity-block {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .awards-override-builder {
        width: 100%;
        padding: 12px;
    }
    .awards-page-header {
        flex-direction: column;
    }
    .awards-save-all {
        width: 100%;
    }
    .awards-override-selectors,
    .awards-override-settings-grid,
    .awards-summary-grid {
        grid-template-columns: 1fr;
    }
    .awards-override-quantity-block {
        grid-column: auto;
    }
}

/* =========================================================
 * Manual override rows inside the main table
 * ========================================================= */

/* Slightly larger minimum UI text for better readability. */
.awards-table thead th {
    font-size: 12px;
}

.awards-row-group-label,
.awards-save-status,
.awards-stat-main span,
.awards-stat-sub,
.awards-control-hint,
.awards-mode-option span,
.awards-number-field span,
.awards-selector-field > span {
    font-size: 11px;
}

.awards-control,
.awards-all-toggle,
.awards-summary-line,
.awards-override-description {
    font-size: 12px;
}

.awards-override-row td {
    background: #fff9ec;
    border-top: 2px solid #e4bd69;
}

.awards-override-row:hover td {
    background: #fff5dc;
}

.awards-override-row td:first-child {
    border-left: 5px solid #d99a2b;
}

.awards-override-row.is-highlighted td {
    background: #ffedbd;
    transition: background .25s ease;
}

.awards-override-name-cell {
    vertical-align: middle !important;
}

.awards-override-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.awards-override-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid #dfb45d;
    border-radius: 999px;
    background: #fff0c9;
    color: #805714;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.awards-override-row-path {
    color: #3e4e59;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.awards-delete-override {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #d5a09a;
    border-radius: 5px;
    background: #fff5f3;
    color: #9a3f36;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.awards-delete-override:hover {
    border-color: #bf7168;
    background: #fde8e5;
}

.awards-delete-override:disabled {
    opacity: .55;
    cursor: default;
}

.awards-override-row-template {
    display: none !important;
}

/* The selector remains a compact add-new-override panel. */
.awards-override-builder {
    width: 840px;
    max-width: 100%;
}

.awards-override-selectors {
    grid-template-columns: repeat(4,minmax(120px,1fr)) auto;
    align-items: end;
}

.awards-add-override-wrap {
    display: flex;
    align-items: flex-end;
}

.awards-add-override {
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid #397fb8;
    border-radius: 5px;
    background: #397fb8;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.awards-add-override:hover:not(:disabled) {
    background: #2f6fa8;
}

.awards-add-override:disabled {
    border-color: #cfd6da;
    background: #e7ebed;
    color: #9ca7ad;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .awards-override-selectors {
        grid-template-columns: repeat(2,minmax(140px,1fr));
    }

    .awards-add-override-wrap {
        align-items: stretch;
    }

    .awards-add-override {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .awards-override-selectors {
        grid-template-columns: 1fr;
    }
}
