/* =====================================================
   ABSpass
   ===================================================== */

.abspass-account-actions {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.abspass-account-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.abspass-account-form input[type="text"] {
    width: 280px;
    min-width: 280px;
    margin: 0;
}

.abspass-delete-form select {
    width: 250px;
    min-width: 250px;
    margin: 0;
}

.abspass-account-form button {
    width: auto;
    margin: 0;
    white-space: nowrap;
}

.abspass-delete-form .danger-button {
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, .55);
}

.abspass-delete-form .danger-button:hover {
    background: rgba(248, 113, 113, .10);
    border-color: #f87171;
}

.abspass-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #2b3850;
    border-radius: 10px;
    background: #111827;
    scrollbar-color: #52627b #111827;
    scrollbar-width: thin;
}

.abspass-table-wrap::-webkit-scrollbar {
    height: 11px;
}

.abspass-table-wrap::-webkit-scrollbar-track {
    background: #111827;
}

.abspass-table-wrap::-webkit-scrollbar-thumb {
    background: #52627b;
    border-radius: 999px;
    border: 2px solid #111827;
}

.abspass-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #111827;
    color: #e6edf7;
}

.abspass-table th,
.abspass-table td {
    height: auto;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #344158;
    border-bottom: 1px solid #344158;
    background: #111827;
    color: #e6edf7;
    white-space: nowrap;
}

.abspass-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #172033;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

html[data-theme="dark"] .abspass-table thead th {
    background: #ffffff !important;
    color: #172033 !important;
}

.abspass-table tbody tr:nth-child(even) td {
    background: #0f1929;
}

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

.abspass-account-column {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 190px;
    min-width: 190px;
    max-width: 190px;
    background: #172033 !important;
}

tbody .abspass-account-column {
    z-index: 1;
    background: #111827 !important;
}

.abspass-table tbody tr:nth-child(even) .abspass-account-column {
    background: #0f1929 !important;
}

.abspass-points-column {
    width: 105px;
    min-width: 105px;
    max-width: 105px;
}

.abspass-day-cell,
.abspass-table thead th:not(.abspass-account-column):not(.abspass-points-column) {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
}

.abspass-table input,
.abspass-table select {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 7px;
    color: #e6edf7;
    background: #1e293b;
    border: 1px solid #3a4a63;
    border-radius: 6px;
    font-size: 13px;
}

.abspass-table select {
    cursor: pointer;
}

.abspass-table input:focus,
.abspass-table select:focus {
    outline: 2px solid rgba(96, 165, 250, .35);
    border-color: #60a5fa;
}

.abspass-table-wrap + button,
.abspass-table-wrap ~ button,
.abspass-table-wrap ~ .button {
    margin-top: 14px;
}

html[data-theme="light"] .abspass-table-wrap {
    background: #ffffff;
    border-color: #cbd5e1;
    scrollbar-color: #94a3b8 #f1f5f9;
}

html[data-theme="light"] .abspass-table {
    background: #ffffff;
    color: #172033;
}

html[data-theme="light"] .abspass-table th,
html[data-theme="light"] .abspass-table td {
    background: #ffffff;
    color: #172033;
    border-color: #cbd5e1;
}

html[data-theme="light"] .abspass-table thead th {
    background: #0f1a2b !important;
    color: #ffffff !important;
}

html[data-theme="light"] .abspass-account-column {
    background: #0f1a2b !important;
    color: #ffffff !important;
}

html[data-theme="light"] .abspass-table tbody tr:nth-child(even) td,
html[data-theme="light"] .abspass-table tbody tr:nth-child(even) .abspass-account-column {
    background: #f8fafc !important;
}

html[data-theme="light"] .abspass-table input,
html[data-theme="light"] .abspass-table select {
    color: #172033;
    background: #ffffff;
    border-color: #cbd5e1;
}

@media (max-width: 760px) {
    .abspass-account-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .abspass-account-form {
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .abspass-account-form input[type="text"],
    .abspass-delete-form select {
        flex: 1 1 220px;
        width: auto;
        min-width: 0;
    }
}

/* ===== ABSPASS STICKY COLUMNS FIX ===== */

/* ??????? ?????? ???? ???? ??????? ????????? ? ?????????????? */
.abspass-table {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* ?? ?????? ??????? ???? */
.abspass-day-cell,
.abspass-table thead th:not(.abspass-account-column):not(.abspass-points-column) {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
}

/* ????? ??????? ?????? ????? ????? */
.abspass-account-column {
    position: sticky !important;
    left: 0 !important;

    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;

    background: #172033 !important;
    border-right: 1px solid #52627b !important;
    box-shadow: 8px 0 12px -10px rgba(0, 0, 0, .95) !important;
}

/* ???????? ?????? ??????? ?????? ???? ????? */
.abspass-table thead .abspass-account-column {
    z-index: 12 !important;
}

/* ????? ??????? ????? ?????? ?????????????? ???? */
.abspass-table tbody .abspass-account-column {
    z-index: 8 !important;
    background: #111827 !important;
}

.abspass-table tbody tr:nth-child(even) .abspass-account-column {
    background: #0f1929 !important;
}

/* ???????? ??????? ?????? ????? ?????? */
.abspass-points-column {
    position: sticky !important;
    right: 0 !important;

    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;

    background: #172033 !important;
    border-left: 1px solid #52627b !important;
    box-shadow: -8px 0 12px -10px rgba(0, 0, 0, .95) !important;
}

/* ???????? ????????? ??????? ?????? ???? */
.abspass-table thead .abspass-points-column {
    z-index: 12 !important;
}

/* ???????? ??????? ????? ?????? ?????????????? ???? */
.abspass-table tbody .abspass-points-column {
    z-index: 8 !important;
    background: #111827 !important;
}

.abspass-table tbody tr:nth-child(even) .abspass-points-column {
    background: #0f1929 !important;
}

/* ?????? ??? ?????? ?????????? ???? ???????????? ??????? */
.abspass-table thead th:not(.abspass-account-column):not(.abspass-points-column) {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
}

.abspass-day-cell {
    position: relative !important;
    z-index: 1 !important;
}

/* ??? ?????? ???????????? ??????? ?? ??????? ?? ??????? */
.abspass-account-column input,
.abspass-points-column input,
.abspass-account-column select,
.abspass-points-column select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ??????? ???? */
html[data-theme="light"] .abspass-account-column,
html[data-theme="light"] .abspass-points-column {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

html[data-theme="light"] .abspass-table tbody .abspass-account-column,
html[data-theme="light"] .abspass-table tbody .abspass-points-column {
    background: #ffffff !important;
}

html[data-theme="light"] .abspass-table tbody tr:nth-child(even) .abspass-account-column,
html[data-theme="light"] .abspass-table tbody tr:nth-child(even) .abspass-points-column {
    background: #f8fafc !important;
}

/* ===== END ABSPASS STICKY COLUMNS FIX ===== */

/* ===== ABSPASS ACCOUNT ACTIONS VISIBILITY ===== */

.abspass-account-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;

    width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 !important;

    visibility: visible !important;
    opacity: 1 !important;
}

.abspass-account-form {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    visibility: visible !important;
    opacity: 1 !important;
}

.abspass-account-form input[type="text"],
.abspass-delete-form select {
    display: block !important;

    height: 40px !important;
    margin: 0 !important;
    padding: 9px 12px !important;

    color: #e6edf7 !important;
    background: #1e293b !important;
    border: 1px solid #3b4a63 !important;
    border-radius: 7px !important;

    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
}

.abspass-account-form input[type="text"] {
    width: 280px !important;
    min-width: 280px !important;
}

.abspass-delete-form select {
    width: 250px !important;
    min-width: 250px !important;
    cursor: pointer !important;
}

.abspass-account-form input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.abspass-account-form button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: max-content !important;
    height: 40px !important;

    margin: 0 !important;
    padding: 9px 14px !important;

    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap !important;
}

.abspass-account-form button.primary {
    color: #ffffff !important;
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
}

.abspass-delete-form .danger-button {
    color: #fecaca !important;
    background: rgba(220, 38, 38, .12) !important;
    border: 1px solid rgba(248, 113, 113, .65) !important;
}

.abspass-delete-form .danger-button:hover {
    color: #ffffff !important;
    background: rgba(220, 38, 38, .25) !important;
    border-color: #f87171 !important;
}

.abspass-delete-form button:disabled,
.abspass-delete-form select:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
}

html[data-theme="light"] .abspass-account-form input[type="text"],
html[data-theme="light"] .abspass-delete-form select {
    color: #172033 !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

@media (max-width: 760px) {
    .abspass-account-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .abspass-account-form {
        width: 100% !important;
        flex-wrap: wrap !important;
    }

    .abspass-account-form input[type="text"],
    .abspass-delete-form select {
        flex: 1 1 220px !important;
        width: auto !important;
        min-width: 0 !important;
    }
}

/* ===== END ABSPASS ACCOUNT ACTIONS VISIBILITY ===== */

/* ===== ABSPASS HEADER DARK ===== */

html[data-theme="dark"] .abspass-table thead th,
html[data-theme="dark"] .abspass-table thead .abspass-account-column,
html[data-theme="dark"] .abspass-table thead .abspass-points-column {
    background: #ffffff !important;
    color: #172033 !important;
}

/* ===== END ABSPASS HEADER DARK ===== */

/* ===== ABSPASS HEADER LIGHT ===== */

html[data-theme="light"] .abspass-table thead th,
html[data-theme="light"] .abspass-table thead .abspass-account-column,
html[data-theme="light"] .abspass-table thead .abspass-points-column {
    background: #0f1a2b !important;
    color: #ffffff !important;
}

/* ===== END ABSPASS HEADER LIGHT ===== */

/* ===== ABSPASS AUTOMATIC POINTS ===== */

.abspass-points-box {
    min-height: 62px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #e6edf7;
    background: #1e293b;
    border: 1px solid #3a4a63;
    border-radius: 7px;
}

.abspass-points-total {
    display: block;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 750;
    line-height: 1;
}

.abspass-points-percent {
    display: block;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

html[data-theme="light"] .abspass-points-box {
    color: #172033;
    background: #ffffff;
    border-color: #cbd5e1;
}

html[data-theme="light"] .abspass-points-total {
    color: #172033;
}

html[data-theme="light"] .abspass-points-percent {
    color: #2563eb;
}

/* ===== END ABSPASS AUTOMATIC POINTS ===== */

/* ===== ABSPASS AUTOSAVE ===== */

.abspass-autosave-note {
    color: #93a4bd;
    font-size: 12px;
}

.abspass-autosave-status {
    display: block;
    min-height: 12px;
    color: #93a4bd;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

.abspass-autosave-status[data-state="saving"] {
    color: #fbbf24;
}

.abspass-autosave-status[data-state="saved"] {
    color: #4ade80;
}

.abspass-autosave-status[data-state="error"] {
    color: #fb7185;
}

html[data-theme="light"] .abspass-autosave-note,
html[data-theme="light"] .abspass-autosave-status {
    color: #64748b;
}

html[data-theme="light"] .abspass-autosave-status[data-state="saving"] {
    color: #b45309;
}

html[data-theme="light"] .abspass-autosave-status[data-state="saved"] {
    color: #15803d;
}

html[data-theme="light"] .abspass-autosave-status[data-state="error"] {
    color: #dc2626;
}

/* ===== END ABSPASS AUTOSAVE ===== */
/* ===== ABSPASS READ-ONLY AND ACCESS MANAGEMENT ===== */

.abspass-readonly-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    color: #93c5fd;
    background: rgb(37 99 235 / 12%);
    border: 1px solid rgb(59 130 246 / 45%);
    border-radius: 8px;
    font-size: 13px;
}

.abspass-table input[readonly],
.abspass-table select:disabled {
    opacity: 0.82;
    cursor: default;
}

.abspass-access-table {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 130px 160px;
    align-items: center;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border-main, #344158);
    border-radius: 8px;
    background: var(--border-main, #344158);
}

.abspass-access-table > * {
    min-height: 42px;
    margin: 0 !important;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    background: var(--panel-bg, #111827);
}

.abspass-access-heading {
    font-weight: 700;
    background: var(--panel-alt, #172033) !important;
}

.abspass-access-checkbox {
    justify-content: center;
}

.abspass-access-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
}

@media (max-width: 700px) {
    .abspass-access-table {
        grid-template-columns: minmax(130px, 1fr) 90px 120px;
        font-size: 12px;
    }
}

/* ===== END ABSPASS ACCESS MANAGEMENT ===== */
