/* ==========================================================================
   ISLAMI COMICS - MY COMICS STYLESHEET
   Matching Mockup Image (My Comics view in Seller Center)
   ========================================================================== */

/* Top Sidebar Label */
.sidebar-top-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #648a7b;
  padding: 4px 14px 12px 14px;
}

/* Primary + Add New Comic Button */
.btn-primary-add-comic {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-green);
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(13, 95, 67, 0.2);
  transition: all 0.2s ease;
}

.btn-primary-add-comic:hover {
  background: #08432f;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 95, 67, 0.3);
}

/* ==========================================================================
   1. TOP 7 METRICS STATUS CARDS GRID
   ========================================================================== */
.mycomics-metrics-grid-7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.status-summary-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 10px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.card-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.icon-green {
  background: #f0fdf4;
  color: #10b981;
}

.icon-green-check {
  background: #ecfdf5;
  color: #059669;
}

.icon-amber {
  background: #fffbeb;
  color: #d97706;
}

.icon-blue {
  background: #eff6ff;
  color: #2563eb;
}

.icon-red {
  background: #fef2f2;
  color: #dc2626;
}

.icon-purple {
  background: #faf5ff;
  color: #7c3aed;
}

.icon-emerald-dollar {
  background: #f0fdf4;
  color: #047857;
}

.card-text-box {
  flex: 1;
  min-width: 0;
}

.card-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub-note {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   2. TABLE CARD & TOOLBAR
   ========================================================================== */
.mycomics-table-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  gap: 16px;
  flex-wrap: wrap;
}

/* Filter Tabs */
.table-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.filter-tab-btn .tab-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-tab-btn:hover {
  color: var(--text-main);
}

.filter-tab-btn.active {
  color: var(--emerald-dark);
  border-bottom-color: var(--emerald);
  font-weight: 800;
}

.filter-tab-btn.active .tab-count {
  color: var(--emerald);
}

/* Toolbar Actions */
.table-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-search-box {
  position: relative;
  width: 220px;
}

.table-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.table-search-box input {
  width: 100%;
  background: #f8faf9;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.table-search-box input:focus {
  background: #ffffff;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.btn-toolbar-filter,
.btn-toolbar-sort {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-toolbar-filter:hover,
.btn-toolbar-sort:hover {
  background: #f8faf9;
  border-color: #cbd5e1;
}

/* ==========================================================================
   3. DATA TABLE
   ========================================================================== */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
}

.comics-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 1050px;
}

.comics-data-table thead tr {
  background: #fbfdfc;
  border-bottom: 1px solid var(--card-border);
}

.comics-data-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
}

.comics-data-table th.th-comic {
  min-width: 280px;
}

.comics-data-table th.th-status {
  min-width: 140px;
}

.comics-data-table th.th-price {
  min-width: 100px;
}

.comics-data-table th.th-sales,
.comics-data-table th.th-readers {
  min-width: 80px;
}

.comics-data-table th.th-rating {
  min-width: 110px;
}

.comics-data-table th.th-revenue {
  min-width: 120px;
}

.comics-data-table th.th-actions {
  min-width: 200px;
}

.comics-data-table tbody tr.comic-row {
  border-bottom: 1px solid #f1f5f3;
  transition: background 0.15s ease;
}

.comics-data-table tbody tr.comic-row:hover {
  background: #f9fbf9;
}

.comics-data-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* Column 1: Comic Info */
.td-comic-info {
  min-width: 280px;
}

.comic-meta-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.comic-row-cover {
  width: 46px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.comic-row-text {
  min-width: 200px;
}

.comic-row-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  line-height: 1.3;
}

.comic-row-genre {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 2px;
  white-space: nowrap;
}

.comic-row-pages {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}

.comic-row-updated {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Column 2: Status */
.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.badge-published {
  background: #f0fdf4;
  color: #10b981;
  border: 1px solid #bbf7d0;
}

.badge-review {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.badge-draft {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.badge-rejected {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-date-sub {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 4px;
  white-space: nowrap;
}

/* Column 3: Price */
.price-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.preview-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f3;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* Column 4 & 5: Sales & Readers */
.sales-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.sales-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.readers-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.sales-dash {
  font-size: 14px;
  color: var(--text-muted);
}

/* Column 6: Rating */
.rating-val {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 3px;
}

.rating-val i {
  color: var(--accent-gold);
  font-size: 11px;
}

.rating-reviews-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Column 7: Revenue */
.revenue-val {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text-main);
  white-space: nowrap;
}

/* Column 8: Actions */
.actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-action-icon {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-action-icon i {
  font-size: 11px;
}

.btn-action-icon:hover {
  background: #f8faf9;
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.btn-action-icon.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-action-icon.action-reason {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.btn-action-icon.action-reason:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.btn-action-more {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 13px;
  letter-spacing: 1px;
}

.btn-action-more:hover {
  color: var(--text-main);
}

/* ==========================================================================
   4. PAGINATION FOOTER
   ========================================================================== */
.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  font-size: 12px;
  color: var(--text-sub);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-summary strong,
.pagination-summary span {
  color: var(--text-main);
  font-weight: 700;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-page-nav,
.btn-page-num {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-page-num.active {
  background: #0d5f43;
  color: #ffffff;
  border-color: #0d5f43;
}

.btn-page-num:hover:not(.active),
.btn-page-nav:hover {
  background: #f8faf9;
  border-color: #cbd5e1;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
}

.pagination-size-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-size-select select {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1100px) {
  .mycomics-metrics-grid-7 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .mycomics-metrics-grid-7 {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .table-toolbar-actions {
    justify-content: space-between;
  }

  .table-search-box {
    flex: 1;
  }
}

@media (max-width: 540px) {
  .mycomics-metrics-grid-7 {
    grid-template-columns: 1fr;
  }
}
