/* ==========================================================================
   ISLAMI COMICS - READERS ROOM STYLESHEET
   Matching Mockup Image 11 Pixel-Perfect Design
   ========================================================================== */

.readers-page-body {
  background-color: #f5f8f6;
}

.readers-main-stage {
  padding-bottom: 40px;
}

/* Header Top CTA Button */
.btn-export-readers-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #064e3b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
  transition: all 0.2s;
}

.btn-export-readers-cta:hover {
  background: #04382a;
  transform: translateY(-1px);
}

/* ==========================================================================
   1. TOP 6 METRIC SUMMARY CARDS (6-GRID)
   ========================================================================== */
.readers-metrics-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.readers-metric-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 10px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-head-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

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

.card-title-text {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.metric-big-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
  line-height: 1.1;
}

.card-growth-sub {
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.growth-up {
  color: #10b981;
}

.growth-up i {
  font-size: 8.5px;
}

.icon-cyan {
  background: #ecfeff;
  color: #0891b2;
}

.icon-pink {
  background: #fdf2f8;
  color: #db2777;
}

/* ==========================================================================
   2. MAIN 2-COLUMN LAYOUT
   ========================================================================== */
.readers-layout-2col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.readers-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.readers-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* ==========================================================================
   3. READER GROWTH CARD (LARGE AREA SPLINE)
   ========================================================================== */
.reader-growth-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.growth-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: nowrap;
  gap: 8px;
}

.growth-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.growth-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.growth-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-total { background: #10b981; }
.dot-new { background: #2563eb; }
.dot-active { background: #8b5cf6; }

.growth-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.select-period-growth {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-date-range-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-date-range-picker:hover {
  border-color: var(--emerald);
  background: #f8faf9;
}

.growth-canvas-container {
  position: relative;
  width: 100%;
  height: 250px;
}

/* ==========================================================================
   4. 3 MINI METRIC CARDS ROW
   ========================================================================== */
.readers-3mini-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mini-insight-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.mini-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.mini-donut-center-wrap {
  position: relative;
  width: 105px;
  height: 105px;
  margin: 0 auto 12px auto;
}

.donut-label-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-big-pct {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}

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

.mini-legend-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.mini-leg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.leg-l {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-sub);
}

.m-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-green { background: #10b981; }
.dot-teal { background: #0d9488; }
.dot-amber { background: #f59e0b; }
.dot-red { background: #ef4444; }
.dot-blue { background: #2563eb; }
.dot-purple { background: #8b5cf6; }
.dot-pink { background: #ec4899; }

.leg-r {
  display: flex;
  align-items: center;
  gap: 4px;
}

.leg-r strong {
  color: var(--text-main);
}

.pct {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* Interests Bars */
.interests-bars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  flex: 1;
}

.interest-bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.int-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
}

.int-label-row strong {
  color: var(--text-main);
  font-size: 10.5px;
}

.int-bar-track {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.int-bar-fill {
  height: 100%;
  border-radius: 99px;
}

.fill-green {
  background: #059669;
}

.link-mini-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-dark);
  text-decoration: none;
  padding-top: 8px;
  border-top: 1px solid #f1f5f3;
  margin-top: auto;
  transition: color 0.2s;
}

.link-mini-details:hover {
  color: var(--emerald);
}

/* ==========================================================================
   5. RECENT READERS TABLE CARD
   ========================================================================== */
.recent-readers-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.recent-readers-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
}

.recent-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.recent-readers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 760px;
}

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

.recent-readers-table th {
  padding: 10px 14px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
}

.recent-readers-table tbody tr {
  border-bottom: 1px solid #f1f5f3;
  transition: background 0.15s;
}

.recent-readers-table tbody tr:hover {
  background: #f9fbf9;
}

.recent-readers-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 11.5px;
}

.reader-cell-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.reader-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.reader-name {
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.td-loc, .td-joined, .td-active {
  white-space: nowrap;
  color: var(--text-sub);
}

.td-reads {
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

/* Favorite Comics Stack */
.fav-comic-stack {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 110px;
}

.fav-thumb {
  width: 22px;
  height: 30px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.fav-plus-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 3px;
}

.chip-reader-active {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  background: #f0fdf4;
  color: #10b981;
}

.link-view-all-readers-footer {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   6. RIGHT COLUMN: 4 CARDS
   ========================================================================== */

/* Demographics Card */
.demographics-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.card-head-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.demographics-donut-wrap {
  position: relative;
  width: 115px;
  height: 115px;
  margin: 0 auto 12px auto;
}

.demographics-legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-leg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.demo-l {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.d-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-demo-18 { background: #10b981; }
.dot-demo-25 { background: #2563eb; }
.dot-demo-35 { background: #8b5cf6; }
.dot-demo-45 { background: #f59e0b; }

/* Top Countries Card */
.top-countries-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.world-map-svg-wrap {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.world-map-svg {
  width: 100%;
  height: 100%;
}

.countries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.country-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.country-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-flag { font-size: 13px; }
.country-name { color: var(--text-sub); }

.country-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-right strong { color: var(--text-main); }
.pct-text { font-size: 10px; color: var(--text-muted); }

.top-countries-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-view-countries-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-dark);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s;
}

.btn-view-countries-modern:hover {
  background: #f8faf9;
  border-color: var(--emerald);
  transform: translateY(-1px);
}

/* Reader Activity Heatmap Card */
.activity-heatmap-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.heatmap-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}

.heatmap-day-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.heatmap-day-label {
  font-size: 9px;
  color: var(--text-muted);
  width: 24px;
  flex-shrink: 0;
}

.heatmap-hour-cells {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  flex: 1;
}

.hm-cell {
  aspect-ratio: 1;
  border-radius: 1.5px;
  background: #f1f5f9;
}

.hm-level-0 { background: #f8fafc; }
.hm-level-1 { background: #d1fae5; }
.hm-level-2 { background: #a7f3d0; }
.hm-level-3 { background: #34d399; }
.hm-level-4 { background: #059669; }
.hm-level-5 { background: #064e3b; }

.heatmap-x-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8.5px;
  color: var(--text-muted);
  padding-left: 27px;
  margin-bottom: 10px;
}

.heatmap-legend-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 9.5px;
  color: var(--text-muted);
}

.heatmap-color-scale {
  display: flex;
  align-items: center;
  gap: 2px;
}

.scale-box {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.scale-box.s1 { background: #d1fae5; }
.scale-box.s2 { background: #a7f3d0; }
.scale-box.s3 { background: #34d399; }
.scale-box.s4 { background: #059669; }
.scale-box.s5 { background: #064e3b; }

/* Grow Your Audience Card */
.grow-audience-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.grow-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #047857;
  margin-bottom: 4px;
}

.grow-card-sub {
  font-size: 11px;
  color: #065f46;
  line-height: 1.35;
  margin: 0 0 10px 0;
  position: relative;
  z-index: 2;
  max-width: 220px;
}

.grow-tips-link {
  font-size: 11.5px;
  font-weight: 800;
  color: #047857;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2;
}

.grow-tips-link:hover {
  text-decoration: underline;
}

.floating-rocket-box {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #047857;
  font-size: 20px;
  opacity: 0.6;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1240px) {
  .readers-metrics-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .readers-layout-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .readers-3mini-cards-grid {
    grid-template-columns: 1fr;
  }
}

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

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