*, *::before, *::after { box-sizing: border-box; }

body {
    background: #12171f;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

/* ── Scrollbars ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.list-container {
    padding: 8px 24px 40px;
}

/* ── Grid overflow fix — inputs have intrinsic min-width that breaks grid columns ── */
.m-row > .input-group,
.row > .input-group { min-width: 0; }

.m-row .input-group input,
.row .input-group input { width: 100%; }

/* ── Dynamic row editors (JS-created, must be global) ── */
.m-history-row { display: grid; grid-template-columns: 68px 130px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.m-history-row input { padding: 8px; background: #12171f; border: 1px solid #333; border-radius: 6px; color: #fff; outline: none; font-family: inherit; font-size: 0.82rem; }
.m-history-row input:focus { border-color: #4b92ff; }

.m-wr-row { display: grid; grid-template-columns: 1fr 60px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.m-wr-row input { padding: 8px; background: #12171f; border: 1px solid #333; border-radius: 6px; color: #fff; outline: none; font-family: inherit; font-size: 0.82rem; }
.m-wr-row input:focus { border-color: #4b92ff; }

.m-history-del {
    background: none; border: 1px solid #444; color: #666;
    border-radius: 5px; padding: 6px 8px; cursor: pointer; font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.m-history-del:hover { color: #ef4444; border-color: #ef4444; }

.wr-row { display: grid; grid-template-columns: 1fr 60px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.wr-row input { padding: 8px; background: #12171f; border: 1px solid #333; border-radius: 6px; color: #fff; outline: none; font-family: inherit; font-size: 0.82rem; }
.wr-row input:focus { border-color: #4caf50; }

.wr-del {
    background: none; border: 1px solid #444; color: #666;
    border-radius: 5px; padding: 6px 8px; cursor: pointer; font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.wr-del:hover { color: #ef4444; border-color: #ef4444; }
