/* ---------------------------------
   Global Layout Rules
---------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Mono';
    overflow-x: hidden;
    min-width: 1050px;
}

/* ---------------------------------
   Summary Box
---------------------------------- */
.log-summary-box {
    color: #adf7ff;
    background-color: #111;
    border-radius: 2px;
    margin: 35px 15px 0 15px;
    width: 350px;
}
.log-summary-box h3 {
    color: #00A2FF;
    font-weight: bold;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
.log-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.log-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: whitesmoke;
    border-bottom: 1px solid #222;
    padding: 4px 0;
}
.log-summary-row .label {
    color: #82E2FF;
}
.log-summary-row .value {
    color: #fff;
}

/* ---------------------------------
   Table Container & Header
---------------------------------- */
.reseller-log-container {
    margin: 35px 15px 0 15px;
    width: calc(100% - 30px);
    color: #adf7ff;
}
.reseller-log-container h3 {
    color: #00A2FF;
    font-weight: bold;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
.add-record-button {
    background-color: #00a2ff;
    color: whitesmoke;
    border: none;
    border-radius: 2px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 10px;
}
.add-record-button:hover {
    background-color: #004b7d;
}

/* ---------------------------------
   Table Styling
---------------------------------- */
.reseller-log-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.reseller-log-table th,
.reseller-log-table td {
    border-bottom: 1px solid #444;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}
.reseller-log-table th {
    background-color: #111;
    color: #82E2FF;
    font-weight: bold;
    font-size: 10px;
}
.reseller-log-table td {
    color: #f0f0f0;
    font-size: 13px;
}
.reseller-log-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}
tr.editing {
    background-color: #2a2a2a;
}
.edit-btn {
    background-color: #00a2ff;
    color: whitesmoke;
    border: none;
    border-radius: 2px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}
.edit-btn:hover {
    background-color: #004b7d;
}

/* ---------------------------------
   Modal Styles
---------------------------------- */
.sales-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
}
.sales-data-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #111;
    padding: 25px 20px;
    border-radius: 4px;
    z-index: 1000;
    width: 90%;
    max-width: 500px;
}
.sales-data-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #00a2ff;
    font-size: 20px;
    font-family: 'Major Mono Display';
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}
.modal-close {
    background: none;
    color: #fff;
    border: none;
    font-size: 20px;
    float: right;
    cursor: pointer;
}
.modal-close:hover {
    color: #00a2ff;
}
.sales-data-modal .modal-inner {
    width: 100%;
}
.sales-data-modal form {
    display: flex;
    flex-direction: column;
}

/* ---------------------------------
   Form Inputs & Labels
---------------------------------- */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    gap: 15px;
}
.form-row label {
    color: #82E2FF;
    font-size: 14px;
    width: 130px;
    text-align: left;
    flex-shrink: 0;
}
.form-row input,
.form-row select {
    flex: 1;
    padding: 5px 0;
    font-size: 16px;
    border: none;
    border-bottom: 1px solid #57CDFF;
    background: none;
    color: #adf7ff;
    outline: none;
}

/* Custom Select Styling */
.sales-data-modal select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    color: #adf7ff;
    border: none;
    border-bottom: 1px solid #57CDFF;
    font-size: 16px;
    padding: 5px 0;
    margin-top: 12px;
    margin-bottom: 12px;
    width: 100%;
    outline: none;
    border-radius: 0 !important;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23adf7ff' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 28px 28px;
}

/* ---------------------------------
   Modal Buttons
---------------------------------- */
.modal-button-row {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-start;
    align-items: center;
}
button.submit-sales-record {
    margin-top: 15px;
    width: 70%;
    background-color: #00a2ff;
    color: whitesmoke;
    border: none;
    border-radius: 2px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
button.submit-sales-record:hover {
    background-color: #004b7d;
}
#deleteRecordBtn {
    background-color: #e3195c;
    color: whitesmoke;
    margin-top: 15px;
    width: 30%;
    border: none;
    border-radius: 2px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
#deleteRecordBtn:hover {
    background-color: #710c2a;
}
.modal-button-row:has(#deleteRecordBtn[style*="display: none"]) .submit-sales-record {
    width: 100%;
}
.modal-button-row.single-button .submit-sales-record {
    width: 100%;
}
.modal-button-row.dual-button .submit-sales-record {
    width: 70%;
}
.modal-button-row.dual-button #deleteRecordBtn {
    width: 30%;
}

/* ---------------------------------
   Number Input Cleanup
---------------------------------- */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="url"],
select,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

@media (max-width: 768px) {
    html, body {
      min-width: 0 !important;
      overflow-x: hidden !important;
    }
    .add-record-button {
      width: 100%;
      text-align: left;
    }
    .reseller-log-table {
      display: none;
    }
    .log-summary-box {
      margin-left: 15px;
      margin-right: 15px;
      width: auto;
    }
    .log-card {
      background-color: #1a1a1a;
      border: 1px solid #333;
      border-radius: 6px;
      padding: 12px 14px;
      margin-bottom: 15px;
      color: #adf7ff;
      font-size: 13px;
      width: 100%;
    }
    .log-card .log-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 8px;
      gap: 10px;
      flex-wrap: wrap;
    }
    .log-card .edit-btn {
      padding: 4px 10px;
      font-size: 12px;
      background-color: #00a2ff;
      border: none;
      border-radius: 2px;
      color: white;
    }
    .log-card .edit-btn:hover {
      background-color: #004b7d;
    }
    .log-card .item-title {
      font-weight: bold;
      flex: 1;
      line-height: 1.2;
    }
    .log-card .platform {
      font-weight: normal;
      font-size: 12px;
      color: #82e2ff;
      margin-left: 4px;
    }
    .log-card .log-dates {
      margin: 6px 0 10px 0;
      font-size: 12px;
      color: #ccc;
      text-align: center;
    }
    .log-card .log-columns {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 10px;
    }
    .log-card .log-column {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
    }
    .log-card .log-column div {
      display: flex;
      justify-content: space-between;
    }
    .log-card .label {
      font-size: 13px;
      color: #82E2FF;
      width: 100px;
    }
    .log-card .value {
      font-size: 13px;
      color: #fff;
    }
    button.submit-sales-record {
        width: 65%;
    }
    #deleteRecordBtn {
        width: 35%;
    }
  }
  