.profit-shell { max-width: 1500px; margin: auto; padding-bottom: 30px; color: #173c43; }
.profit-shell [hidden] { display: none !important; }
.profit-shell p { line-height: 1.65; }
.profit-rules { display: grid; gap: 9px; padding: 20px 24px; background: #e7f2ef; border: 1px solid #c8ded8; border-radius: 14px; margin-bottom: 20px; }
.profit-rules small, .profit-shell label small, .profit-actions small, .profit-meta { color: #526d76; line-height: 1.65; }
.profit-upload, .profit-scope { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; background: #fff; border: 1px solid #d7e1e1; padding: 24px; border-radius: 14px; margin-bottom: 18px; }
.profit-shell label { display: grid; align-content: start; gap: 10px; font-weight: 600; min-width: 0; }
.profit-shell label small { font-weight: 400; }
.profit-shell input, .profit-shell select { min-width: 0; max-width: 100%; padding: 10px; border: 1px solid #bdcfd0; border-radius: 6px; background: #fff; color: #143c42; font: inherit; }
.profit-shell input:focus, .profit-shell select:focus { outline: 2px solid #0b8974; outline-offset: 2px; }
.profit-shell button { cursor: pointer; padding: 10px 16px; border: 1px solid #b4ccca; border-radius: 8px; background: #fff; color: #173c43; font: inherit; }
.profit-shell button.portal-primary-button { background: #07836f; color: #fff; border-color: #07836f; }
.profit-shell button:disabled { cursor: wait; opacity: .55; }
.profit-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; grid-column: 1 / -1; }
.profit-scope { grid-template-columns: 2fr 1fr; }
.profit-aliases { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.profit-message { padding: 15px 18px; border-radius: 8px; background: #edf3f6; overflow-wrap: anywhere; }
.profit-message.error { color: #8d281e; background: #fff0e8; }
.profit-result-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.profit-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin: 20px 0; }
.profit-card { display: grid; gap: 12px; padding: 18px; border: 1px solid #c8dbd7; background: #fff; border-radius: 10px; }
.profit-card span { color: #526d76; font-size: 13px; }
.profit-card strong { font-size: 19px; }
.profit-negative { color: #b12c25; }
.profit-table-wrap { max-width: 100%; overflow: auto; border: 1px solid #cbd8df; border-radius: 10px; background: #fff; }
.profit-table-wrap table { border-collapse: collapse; min-width: 2200px; width: 100%; font-size: 13px; }
.profit-table-wrap th { background: #31586c; color: #fff; padding: 14px 12px; text-align: left; line-height: 1.6; }
.profit-table-wrap td { padding: 12px; border-bottom: 1px solid #e1e8ed; }
.profit-table-wrap tr:nth-child(even) { background: #f1f6fa; }
.profit-table-wrap input { width: 90px; padding: 7px; font-size: 13px; }
.profit-table-wrap td:nth-child(17) input { width: 160px; }
.profit-history-section { border-top: 1px solid #d5e1e1; margin-top: 28px; padding-top: 12px; }
.profit-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; }
.profit-history button { text-align: left; line-height: 1.6; }
@media (max-width: 760px) { .profit-upload, .profit-scope { grid-template-columns: 1fr; padding: 16px; } .profit-result-heading { display: block; } .profit-shell h1 { font-size: 26px; } }
#profitPage input[type="file"] { display: block; width: 100%; margin-top: 10px; padding: 9px; border: 1px solid #c7d9d4; border-radius: 8px; background: white; font: inherit; }
#profitPage table { table-layout: fixed; width: 2380px; }
#profitPage table th { width: 125px; color: #fff !important; position: static; }
#profitPage table th:first-child { width: 95px; }
#profitPage table th:nth-child(2) { width: 130px; }
#profitPage table th:nth-child(3) { width: 75px; }
#profitPage table th:nth-child(4) { width: 230px; }
#profitPage table th:nth-child(5) { width: 100px; }
#profitPage table th:nth-child(17) { width: 200px; }
#profitPage table th:nth-child(18) { width: 160px; }
#profitPage table th, #profitPage table td { font-size: 13px; overflow-wrap: anywhere; }
#profitPage table td.profit-negative { color: #b12c25 !important; }
#adminAccountsTable { min-width: 1220px; width: 100%; table-layout: fixed; }
#adminAccountsTable th:nth-child(1) { width: 18%; }
#adminAccountsTable th:nth-child(2) { width: 10%; }
#adminAccountsTable th:nth-child(3) { width: 8%; }
#adminAccountsTable th:nth-child(4) { width: 6%; }
#adminAccountsTable th:nth-child(5) { width: 13%; }
#adminAccountsTable th:nth-child(6) { width: 8%; }
#adminAccountsTable th:nth-child(7) { width: 13%; }
#adminAccountsTable th:nth-child(8) { width: 24%; }
#adminAccountsTable td { overflow-wrap: anywhere; }
#adminAccountsTable td:nth-child(4) { white-space: nowrap; }
#adminAccountsTable td:last-child button { margin: 3px 3px 3px 0; white-space: nowrap; }
