/* ===================================================================
   admin-courses-polish.css  (v3)
   Polish overlay that sits on top of admin-courses.css.
   Add to /admin/courses/index.html, edit.html, authors.html AFTER
   admin-courses.css so the cascade wins.

   v3 changes:
     • .cp-page-subtitle — DOUBLED font size (15.5px → 28px) per request
     • .cp-page-title-emoji — sepia filter REMOVED (was distorting emoji
       and inheriting transparent fill from gradient h1). Now resets
       text-fill-color so the emoji renders in its full natural color,
       with just a warm glow.
     • .cp-card-title-icon — same simplification, keeps warm glow but
       drops the color-distorting sepia/saturate chain.
   =================================================================== */

/* ============= 1 — BODY / PAGE BACKGROUND ============= */

body.admin-page,
body {
  background:
    radial-gradient(ellipse 900px 460px at 50% -180px, rgba(255, 140, 0, 0.09), transparent 60%),
    radial-gradient(ellipse 1400px 700px at 50% -80px, rgba(255, 140, 0, 0.035), transparent 70%),
    linear-gradient(180deg, #0a0e14 0%, #06080d 100%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat;
}

/* Subtle grid overlay for texture (very low opacity, optional) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 140, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 140, 0, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 1000px 600px at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 1000px 600px at 50% 0%, black 30%, transparent 75%);
  opacity: 0.6;
}

main.main-content,
.main-content,
.cp-container {
  position: relative;
  z-index: 1;
}

/* ============= 2 — PAGE TITLE ============= */

.cp-page-title {
  margin: 14px 0 6px;
  position: relative;
}

.cp-page-title h1 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(2rem, 4.4vw, 2.8rem) !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #fff3d6 0%, #ffd700 40%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.4px;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 4px 30px rgba(255, 140, 0, 0.15);
}

/* [v3] Reset gradient inheritance so emoji renders in full natural color.
   The h1 sets -webkit-text-fill-color:transparent for the gradient text
   effect — that property is inherited by children and was making the
   emoji partly disappear. We undo it here and just add a soft warm glow. */
.cp-page-title-emoji {
  display: inline-block;
  -webkit-text-fill-color: initial !important;
  color: initial;
  background: none !important;
  -webkit-background-clip: initial !important;
          background-clip: initial !important;
  margin-right: 8px;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.5));
}

/* Gold accent line under title */
.cp-page-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, #ff8c00 50%, transparent);
  border-radius: 2px;
  opacity: 0.9;
}

/* [v3] DOUBLED subtitle font size per user request */
.cp-page-subtitle {
  font-size: 28px !important;             /* was 15.5px */
  line-height: 1.5 !important;
  color: rgba(230, 237, 243, 0.85) !important;
  margin: 18px auto 28px !important;
  max-width: 920px;
  text-align: center;
  font-weight: 400 !important;
}

/* ============= 3 — STATS CARDS ============= */

.cp-stat {
  background:
    linear-gradient(180deg, rgba(26, 32, 48, 0.7) 0%, rgba(15, 20, 28, 0.7) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 8px 24px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.cp-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.5), transparent);
  opacity: 0.6;
}

.cp-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 0, 0.3) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 140, 0, 0.15) !important;
}

.cp-stat-icon {
  background: linear-gradient(180deg, rgba(255, 140, 0, 0.12), rgba(255, 140, 0, 0.04)) !important;
  border: 1px solid rgba(255, 140, 0, 0.18);
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.1) inset;
}

.cp-stat-label {
  color: rgba(230, 237, 243, 0.5) !important;
  font-weight: 600;
}

.cp-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px !important;
  background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============= 4 — CARDS / PANELS ============= */

.cp-card {
  background:
    linear-gradient(180deg, rgba(19, 24, 32, 0.78) 0%, rgba(13, 17, 24, 0.78) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 10px 30px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.cp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.35), transparent);
}

.cp-card-header {
  border-bottom: 1px solid rgba(255, 140, 0, 0.18) !important;
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
}

.cp-card-title {
  font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif !important;
  font-size: 18px !important;
  letter-spacing: 2.5px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  text-transform: uppercase !important;
}

/* [v3] Drop the sepia/saturate chain — it was distorting emoji colors.
   Keep just a warm glow that subtly highlights the icon without
   changing its natural color. */
.cp-card-title-icon {
  font-size: 22px !important;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.55));
}

/* ============= 5 — FORM ELEMENTS (defensive) ============= */
/* Catch ALL inputs, selects, textareas inside .cp-card and .cp-toolbar
   even if they're missing the .cp-input / .cp-select class. */

.cp-card input[type="text"],
.cp-card input[type="number"],
.cp-card input[type="email"],
.cp-card input[type="url"],
.cp-card input[type="search"],
.cp-card input[type="tel"],
.cp-card input[type="password"],
.cp-card select,
.cp-card textarea,
.cp-toolbar input[type="text"],
.cp-toolbar input[type="search"],
.cp-toolbar input[type="number"],
.cp-toolbar select,
.cp-input,
.cp-select,
.cp-textarea {
  background: rgba(8, 12, 18, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e6edf3 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

.cp-card input::placeholder,
.cp-toolbar input::placeholder,
.cp-input::placeholder,
.cp-textarea::placeholder {
  color: rgba(230, 237, 243, 0.32) !important;
}

/* Custom chevron arrow for native selects */
.cp-card select,
.cp-toolbar select,
.cp-select,
select.cp-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%23ff8c00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-color: rgba(8, 12, 18, 0.85) !important;
  padding-right: 36px !important;
  cursor: pointer;
}

/* Style dropdown <option> menu (limited cross-browser; works in some) */
.cp-card select option,
.cp-toolbar select option,
.cp-select option,
select.cp-select option {
  background: #0a0e14 !important;
  color: #e6edf3 !important;
}

/* Focus state — gold glow */
.cp-card input:focus,
.cp-card select:focus,
.cp-card textarea:focus,
.cp-toolbar input:focus,
.cp-toolbar select:focus,
.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus {
  outline: none !important;
  border-color: rgba(255, 140, 0, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.14), 0 0 14px rgba(255, 140, 0, 0.1) !important;
  background: rgba(10, 14, 20, 0.95) !important;
}

/* Multi-select (the Categories listbox) */
.cp-card select[multiple],
select[multiple].cp-select {
  background-image: none !important;
  padding-right: 12px !important;
  min-height: 110px;
}
.cp-card select[multiple] option,
select[multiple].cp-select option {
  padding: 6px 10px;
}
.cp-card select[multiple] option:checked,
select[multiple].cp-select option:checked {
  background: linear-gradient(0deg, rgba(255, 140, 0, 0.25), rgba(255, 140, 0, 0.25)), #0a0e14 !important;
  color: #ffd07a !important;
}

/* Label refinement */
.cp-label {
  color: rgba(230, 237, 243, 0.62) !important;
  font-size: 11.5px !important;
  letter-spacing: 0.8px !important;
  font-weight: 600 !important;
}

/* Checkbox accent */
.cp-checkbox-row input[type="checkbox"] {
  accent-color: #ff8c00 !important;
  width: 17px !important;
  height: 17px !important;
}
.cp-checkbox-row {
  font-size: 13px !important;
  color: rgba(230, 237, 243, 0.85) !important;
}

/* ============= 6 — BUTTONS ============= */

.cp-btn-gold {
  background: linear-gradient(180deg, #ff9d1f 0%, #d97400 100%) !important;
  color: #1a1004 !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 4px 14px rgba(255, 140, 0, 0.28),
    0 0 0 1px rgba(255, 140, 0, 0.5) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
  border: none !important;
}

.cp-btn-gold:hover {
  background: linear-gradient(180deg, #ffae44 0%, #ff8c00 100%) !important;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 6px 20px rgba(255, 140, 0, 0.4),
    0 0 0 1px rgba(255, 140, 0, 0.7) !important;
}

.cp-btn-gold:active {
  transform: translateY(0);
}

.cp-btn {
  background: rgba(26, 32, 48, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(230, 237, 243, 0.85) !important;
  transition: all 0.15s ease !important;
}

.cp-btn:hover {
  border-color: rgba(255, 140, 0, 0.5) !important;
  color: #ffa733 !important;
  background: rgba(255, 140, 0, 0.06) !important;
}

.cp-btn-gold-outline {
  background: transparent !important;
  color: #ffa733 !important;
  border: 1px solid rgba(255, 140, 0, 0.5) !important;
}

.cp-btn-gold-outline:hover {
  background: rgba(255, 140, 0, 0.1) !important;
  border-color: #ff8c00 !important;
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.18) !important;
}

/* ============= 7 — TOOLBAR (search/filters row) ============= */

.cp-toolbar {
  gap: 12px !important;
  padding: 12px;
  background: rgba(10, 14, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  margin-bottom: 16px !important;
}

.cp-toolbar .cp-search,
.cp-toolbar input[type="search"],
.cp-toolbar input[type="text"]:first-of-type {
  min-width: 220px !important;
  padding-left: 36px !important;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><circle cx='6' cy='6' r='4.5' stroke='%23ff8c00' stroke-width='1.4'/><path d='M9.5 9.5L12 12' stroke='%23ff8c00' stroke-width='1.4' stroke-linecap='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
}

/* ============= 8 — TABLE ============= */

.cp-table thead {
  background: linear-gradient(180deg, rgba(26, 32, 48, 0.7), rgba(19, 24, 32, 0.7)) !important;
}

.cp-table th {
  color: rgba(230, 237, 243, 0.5) !important;
  letter-spacing: 0.8px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 140, 0, 0.2) !important;
  padding: 12px 14px !important;
}

.cp-table td {
  padding: 13px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  transition: background 0.12s ease;
}

.cp-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.012);
}

.cp-table tbody tr {
  position: relative;
  transition: background 0.12s ease;
}

.cp-table tbody tr:hover td {
  background: rgba(255, 140, 0, 0.05) !important;
}

.cp-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #ff8c00;
}

.cp-table-empty {
  padding: 60px 20px !important;
  font-size: 13px;
  color: rgba(230, 237, 243, 0.4) !important;
}

/* ============= 9 — BADGES ============= */

.cp-badge {
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
}

.cp-badge.b-active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3) inset;
}

.cp-badge.b-inactive {
  background: rgba(139, 148, 158, 0.1) !important;
  color: #8b949e !important;
  box-shadow: 0 0 0 1px rgba(139, 148, 158, 0.25) inset;
}

.cp-badge.b-gold {
  background: rgba(255, 140, 0, 0.12) !important;
  color: #ffa733 !important;
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.35) inset;
}

.cp-badge.b-warn {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3) inset;
}

.cp-badge.b-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) inset;
}

.cp-badge.b-blue {
  background: rgba(64, 156, 255, 0.12) !important;
  color: #60a5fa !important;
  box-shadow: 0 0 0 1px rgba(64, 156, 255, 0.3) inset;
}

.cp-badge.b-purple {
  background: rgba(176, 131, 240, 0.12) !important;
  color: #c084fc !important;
  box-shadow: 0 0 0 1px rgba(176, 131, 240, 0.3) inset;
}

/* ============= 10 — TABLE ACTIONS (Edit / Delete buttons) ============= */

.cp-table-actions .cp-btn,
.cp-table-actions .cp-btn-sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

.cp-table-actions .cp-btn-gold-outline {
  background: rgba(255, 140, 0, 0.08) !important;
  border-color: rgba(255, 140, 0, 0.45) !important;
}
.cp-table-actions .cp-btn-gold-outline:hover {
  background: rgba(255, 140, 0, 0.15) !important;
  border-color: #ff8c00 !important;
}

.cp-table-actions .cp-btn-danger {
  background: rgba(239, 68, 68, 0.05) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: rgba(239, 68, 68, 0.85) !important;
}
.cp-table-actions .cp-btn-danger:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

/* ============= 11 — MODAL (used by "Add from Library") ============= */

.cp-modal {
  background:
    linear-gradient(180deg, rgba(19, 24, 32, 0.95), rgba(13, 17, 24, 0.95)) !important;
  border: 1px solid rgba(255, 140, 0, 0.2) !important;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 140, 0, 0.08) !important;
}

.cp-modal-header {
  border-bottom: 1px solid rgba(255, 140, 0, 0.2) !important;
}

.cp-modal-title {
  font-family: 'Bebas Neue', Impact, sans-serif !important;
  font-size: 18px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #ffa733 !important;
}

.cp-modal-footer {
  background: rgba(10, 14, 20, 0.6) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.cp-lib-item.is-selected {
  background: linear-gradient(90deg, rgba(255, 140, 0, 0.12), rgba(255, 140, 0, 0.04)) !important;
  border-color: rgba(255, 140, 0, 0.4) !important;
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.15) inset;
}

/* ============= 12 — EDIT PAGE: LINK LIST ITEMS ============= */

.cp-link-item {
  background: rgba(10, 14, 20, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cp-link-item:hover {
  background: rgba(255, 140, 0, 0.05) !important;
  border-color: rgba(255, 140, 0, 0.25) !important;
}

.cp-link-num {
  background: linear-gradient(180deg, rgba(255, 140, 0, 0.2), rgba(255, 140, 0, 0.06)) !important;
  border: 1px solid rgba(255, 140, 0, 0.35);
  color: #ffd07a !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.15) inset;
}

/* ============= 13 — HEADER NAV BUTTON CONSISTENCY ============= */

.admin-nav-right .dashboard-button {
  background: linear-gradient(180deg, rgba(255, 140, 0, 0.14), rgba(255, 140, 0, 0.06)) !important;
  border: 1px solid rgba(255, 140, 0, 0.35) !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  color: #ffa733 !important;
  font-weight: 600 !important;
  transition: all 0.18s ease !important;
}
.admin-nav-right .dashboard-button:hover {
  background: linear-gradient(180deg, rgba(255, 140, 0, 0.25), rgba(255, 140, 0, 0.1)) !important;
  border-color: #ff8c00 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 140, 0, 0.2);
}

/* ============= 14 — TOAST polish ============= */

.cp-toast {
  background: linear-gradient(180deg, rgba(19, 24, 32, 0.96), rgba(13, 17, 24, 0.96)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============= 14b — PROMO CODES & BUNDLE TIERS readability ============= */
/* [v3] These tables use their own .pc-table / .bt-table classes (not
   .cp-table), so the bright cell color from section 8 doesn't reach them.
   Make sure their text is readable instead of inheriting dim defaults. */

.pc-table tbody td,
.bt-table tbody td {
  color: #e6edf3 !important;
}

.pc-used-cell,
.pc-expires-cell {
  color: rgba(230, 237, 243, 0.95) !important;
}

.pc-description {
  color: rgba(230, 237, 243, 0.7) !important;
}

/* ============= 15 — MOBILE TWEAKS ============= */

@media (max-width: 720px) {
  .cp-page-title h1 {
    font-size: 1.8rem !important;
  }
  .cp-page-subtitle {
    font-size: 20px !important;
  }
  body::before {
    background-size: 32px 32px;
    opacity: 0.4;
  }
  .cp-stat {
    padding: 14px !important;
  }
  .cp-stat-value {
    font-size: 22px !important;
  }
  .cp-card {
    padding: 18px !important;
  }
}

/* End of admin-courses-polish.css v3 */
