/* =====================================================
   TRADING MASTER MIND — Admin Styles
   ===================================================== */

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================== Header Buttons ===================== */
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #525252;
  transition: all .15s ease;
  position: relative;
}
.icon-btn:hover { background: #f5f5f5; color: #171717; }
.icon-btn:active { transform: scale(.94); }

/* =====================================================
   FILTER BAR (matches screenshot exactly)
   ===================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
}

.filter-control {
  height: 30px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  font-size: 12.5px;
  font-family: inherit;
  color: #2c2c2c;
  outline: none;
  min-width: 110px;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.filter-control:hover { border-color: #a3a3a3; }
.filter-control:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

select.filter-control {
  padding-right: 24px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.filter-date {
  font-variant-numeric: tabular-nums;
  min-width: 130px;
}

.filter-input-grow {
  flex: 1;
  min-width: 130px;
}

.filter-label {
  font-size: 12.5px;
  color: #525252;
  padding: 0 4px;
}

.filter-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 500;
  color: #2c2c2c;
  cursor: pointer;
  transition: all .12s ease;
}
.filter-search-btn:hover {
  background: #f5f5f5;
  border-color: #a3a3a3;
}

/* =====================================================
   REPORT TABLE — Bordered grid matching screenshot
   ===================================================== */
.table-wrap {
  overflow-x: auto;
  background: #fff;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #2c2c2c;
  background: #fff;
  border: 1px solid #c8c8c8;
}

/* HEADER ROW */
.report-table thead tr {
  background: #f1f1f1;
}
.report-table thead th {
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  border: 1px solid #c8c8c8;
  vertical-align: middle;
  background: #f1f1f1;
}

/* BODY CELLS */
.report-table tbody td {
  padding: 8px 12px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #d8d8d8;
  white-space: nowrap;
  height: 36px;
  background: #fff;
  font-size: 13px;
}

.report-table tbody tr:hover td { background: #fafafa; }

.loading-cell {
  padding: 48px 16px !important;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* VIEW-ONLY MODE (dashboard) */
.report-table.view-only tbody tr {
  transition: background .12s ease;
}
.report-table.view-only tbody tr:hover {
  background: #f9fafb;
}
.report-table.view-only tbody tr:hover td {
  background: #f9fafb;
}

/* EDITABLE CELL INPUT (used elsewhere if needed) */
.cell-edit {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 36px;
  padding: 8px 10px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-family: inherit;
  color: #2c2c2c;
  text-align: center;
  outline: none;
  cursor: text;
}

/* ACTION CELL */
.action-cell {
  text-align: center;
  padding: 0 !important;
}
.row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  color: #6b7280;
  transition: all .15s ease;
  background: transparent;
}
.row-btn:hover {
  background: #f1f1f1;
  color: #1d4ed8;
}
.row-btn.delete:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* New row flash */
.row-new td { animation: rowFlash 1.6s ease; }
@keyframes rowFlash {
  0% { background: rgba(212,175,55,0.22); }
  100% { background: #fff; }
}

/* Saved indicator */
.cell-saved {
  position: relative;
}
.cell-saved::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16a34a;
  animation: fadeOut 1.4s ease forwards;
  z-index: 3;
}
@keyframes fadeOut {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Pagination */
.pg-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #525252;
  border: 1px solid #d1d5db;
  background: #fff;
  transition: all .15s ease;
}
.pg-btn:hover:not(:disabled) { background: #f5f5f5; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Sidebar */
#sidebar.open { transform: translateX(0); }

/* Scrollbar */
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: #f9fafb; }
.table-wrap::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 5px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Toast */
#toast.show {
  display: block;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form inputs (edit page) */
.form-input {
  display: block;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #171717;
  transition: all .15s ease;
  outline: none;
  width: 100%;
}
.form-input:hover { border-color: #a3a3a3; }
.form-input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}

/* =====================================================
   MANAGE PAGE — Modern list-style table
   ===================================================== */
.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.manage-table thead {
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
}
.manage-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #525252;
  white-space: nowrap;
}
.manage-table thead th.text-right { text-align: right; }
.manage-table tbody tr {
  border-bottom: 1px solid #f1f1f1;
  transition: background .12s ease;
}
.manage-table tbody tr:hover { background: #fafafa; }
.manage-table tbody tr:last-child { border-bottom: none; }
.manage-table .manage-td {
  padding: 10px 14px;
  font-size: 13px;
  color: #2c2c2c;
  vertical-align: middle;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action buttons on manage page */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d4d4d4;
  background: #fff;
  color: #2c2c2c;
  cursor: pointer;
  transition: all .12s ease;
  text-decoration: none;
}
.action-btn:hover {
  background: #f5f5f5;
  border-color: #a3a3a3;
}
.action-btn-edit:hover {
  background: #fef9e7;
  border-color: #d4af37;
  color: #92400e;
}
.action-btn-delete {
  padding: 5px 7px;
}
.action-btn-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Modals */
#addModal.flex,
#headingsModal.flex {
  display: block;
}
