/* ==========================================================================
   DERMAX STEP 9M — SAFE TUTOR LMS DASHBOARD SKIN
   IMPORTANT:
   - Does NOT replace Tutor's own background/theme system.
   - Does NOT force sidebar/content colors.
   - Does NOT override dashboard layout.
   - Only adds DERMAX typography, borders, accents and button treatment.
   ========================================================================== */

body.dermax-tutor-dashboard {
  --dmx-gold: #b78a43;
  --dmx-gold-dark: #956b2d;
  --dmx-gold-light: #d8b776;
  --dmx-border: rgba(183,138,67,.26);
  --dmx-font-body: "Inter", Arial, sans-serif;
  --dmx-font-heading: "Playfair Display", Georgia, serif;
}

/* Keep Tutor's own shell/background completely intact. */
body.dermax-tutor-dashboard .tutor-dashboard,
body.dermax-tutor-dashboard .tutor-dashboard-left-menu,
body.dermax-tutor-dashboard .tutor-dashboard-sidebar,
body.dermax-tutor-dashboard .tutor-dashboard-permalinks,
body.dermax-tutor-dashboard .tutor-dashboard-header,
body.dermax-tutor-dashboard .tutor-dashboard-content,
body.dermax-tutor-dashboard .tutor-dashboard-content-inner {
  background-color: inherit;
}

/* Typography only — no forced color. */
body.dermax-tutor-dashboard,
body.dermax-tutor-dashboard .tutor-dashboard {
  font-family: var(--dmx-font-body);
}

body.dermax-tutor-dashboard .tutor-dashboard-content h1,
body.dermax-tutor-dashboard .tutor-dashboard-content h2,
body.dermax-tutor-dashboard .tutor-dashboard-content h3 {
  font-family: var(--dmx-font-heading) !important;
  font-weight: 500 !important;
  letter-spacing: -.02em;
}

/* Sidebar: preserve Tutor colors; add only shape/spacing/accent. */
body.dermax-tutor-dashboard .tutor-dashboard-permalinks {
  padding: 14px 12px 18px !important;
}

body.dermax-tutor-dashboard .tutor-dashboard-permalinks a {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 3px 0;
  padding: 0 13px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  font-family: var(--dmx-font-body);
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

body.dermax-tutor-dashboard .tutor-dashboard-permalinks a:hover {
  transform: translateX(2px);
  border-color: var(--dmx-border) !important;
}

body.dermax-tutor-dashboard .tutor-dashboard-permalinks li.active a,
body.dermax-tutor-dashboard .tutor-dashboard-permalinks .active a,
body.dermax-tutor-dashboard .tutor-dashboard-permalinks a.active {
  border-color: rgba(183,138,67,.40) !important;
  box-shadow: inset 3px 0 0 var(--dmx-gold);
}

/* Header: preserve Tutor theme, add subtle DERMAX divider. */
body.dermax-tutor-dashboard .tutor-dashboard-header {
  border-bottom-color: var(--dmx-border) !important;
}

body.dermax-tutor-dashboard .tutor-dashboard-header-avatar img,
body.dermax-tutor-dashboard .tutor-avatar img {
  border: 2px solid rgba(183,138,67,.42) !important;
}

/* Cards: no background override. */
body.dermax-tutor-dashboard .tutor-card,
body.dermax-tutor-dashboard [class*="dashboard-info-card"],
body.dermax-tutor-dashboard [class*="dashboard-card"] {
  border-radius: 14px !important;
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

body.dermax-tutor-dashboard .tutor-card:hover,
body.dermax-tutor-dashboard [class*="dashboard-info-card"]:hover {
  border-color: rgba(183,138,67,.32) !important;
}

/* Buttons: only explicit primary/outline Tutor buttons. */
body.dermax-tutor-dashboard .tutor-btn-primary,
body.dermax-tutor-dashboard button.tutor-btn-primary,
body.dermax-tutor-dashboard a.tutor-btn-primary {
  border-color: var(--dmx-gold) !important;
  border-radius: 8px !important;
  background: #171717 !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.dermax-tutor-dashboard .tutor-btn-primary:hover,
body.dermax-tutor-dashboard button.tutor-btn-primary:hover,
body.dermax-tutor-dashboard a.tutor-btn-primary:hover {
  border-color: var(--dmx-gold-light) !important;
  background: #26231e !important;
}

body.dermax-tutor-dashboard .tutor-btn-outline-primary {
  border-color: var(--dmx-border) !important;
  border-radius: 8px !important;
}

/* Inputs: preserve Tutor background/text, only border focus. */
body.dermax-tutor-dashboard .tutor-form-control,
body.dermax-tutor-dashboard input[type="text"],
body.dermax-tutor-dashboard input[type="email"],
body.dermax-tutor-dashboard input[type="password"],
body.dermax-tutor-dashboard input[type="number"],
body.dermax-tutor-dashboard textarea,
body.dermax-tutor-dashboard select {
  border-radius: 8px !important;
}

body.dermax-tutor-dashboard .tutor-form-control:focus,
body.dermax-tutor-dashboard input:focus,
body.dermax-tutor-dashboard textarea:focus,
body.dermax-tutor-dashboard select:focus {
  border-color: var(--dmx-gold) !important;
  box-shadow: 0 0 0 3px rgba(183,138,67,.07) !important;
}

/* Tables / course cards — shape only. */
body.dermax-tutor-dashboard .tutor-course-card,
body.dermax-tutor-dashboard [class*="tutor-course-card"],
body.dermax-tutor-dashboard .tutor-table,
body.dermax-tutor-dashboard table {
  border-radius: 12px;
}

/* Small fixed shortcut only; no DOM injection into Tutor panels. */
body.dermax-tutor-dashboard .dermax-dashboard-floating-home {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(183,138,67,.36);
  border-radius: 999px;
  background: rgba(17,17,17,.88);
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.dermax-tutor-dashboard .dermax-dashboard-floating-home span:last-child {
  color: var(--dmx-gold-light);
  font-size: 14px;
}

@media (max-width: 767px) {
  body.dermax-tutor-dashboard .tutor-dashboard-permalinks a {
    min-height: 40px;
  }

  body.dermax-tutor-dashboard .dermax-dashboard-floating-home {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.dermax-tutor-dashboard .tutor-dashboard-permalinks a,
  body.dermax-tutor-dashboard .tutor-card {
    transition: none !important;
  }
}


/* ==========================================================================
   STEP 9N — STUDENT DASHBOARD ONLY
   Tutor LMS 4.x can let admins/instructors switch profile mode.
   DERMAX intentionally exposes only the learner/student portal.
   ========================================================================== */

/*
 * Tutor 4.x class names can vary between minor releases. These selectors are
 * deliberately limited to dashboard controls that explicitly identify
 * instructor/profile switching. If a selector does not exist, it is harmless.
 */
body.dermax-tutor-dashboard [data-tutor-profile-switch],
body.dermax-tutor-dashboard [data-profile-switch],
body.dermax-tutor-dashboard .tutor-profile-switch,
body.dermax-tutor-dashboard .tutor-dashboard-profile-switch,
body.dermax-tutor-dashboard .tutor-switch-view,
body.dermax-tutor-dashboard .tutor-instructor-switch,
body.dermax-tutor-dashboard .tutor-become-instructor-button,
body.dermax-tutor-dashboard [class*="become-instructor"] {
  display: none !important;
}
