/*
 * Tutor LMS Custom Dashboard – Styles
 * BEM naming · Mobile-first · CSS variables
 *
 * File: tutor-dashboard-custom/assets/css/dashboard-style.css
 */

/* ══════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════ */

:root {
  --tdc-primary:        #0d0d7a;
  --tdc-primary-hover:  #1a1ab0;
  --tdc-primary-light:  #e8e8ff;
  --tdc-gradient:       linear-gradient(135deg, #0d0d7a 0%, #1717cc 60%, #0d0d7a 100%);
  --tdc-banner-gradient:linear-gradient(110deg, #0a0a6b 0%, #1c1ca8 45%, #0f0f5c 100%);

  --tdc-bg:             #f2f4f8;
  --tdc-card-bg:        #ffffff;
  --tdc-sidebar-bg:     #ffffff;

  --tdc-text:           #1a1a2e;
  --tdc-text-muted:     #6b7280;
  --tdc-border:         #e8eaee;

  --tdc-success:        #16a34a;
  --tdc-success-bg:     #dcfce7;
  --tdc-danger:         #dc2626;
  --tdc-danger-bg:      #fee2e2;
  --tdc-warning:        #d97706;
  --tdc-warning-bg:     #fef3c7;
  --tdc-refunded:       #2563eb;
  --tdc-refunded-bg:    #dbeafe;

  --tdc-radius:         14px;
  --tdc-radius-lg:      20px;
  --tdc-radius-pill:    100px;

  --tdc-shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.06);
  --tdc-shadow:         0 4px 20px rgba(0, 0, 0, 0.08);
  --tdc-shadow-hover:   0 8px 32px rgba(0, 0, 0, 0.14);

  --tdc-sidebar-width:  260px;
  --tdc-transition:     0.22s ease;

  --tdc-font-sm:        0.8125rem;   /* 13px */
  --tdc-font-base:      0.9375rem;   /* 15px */
  --tdc-font-lg:        1.0625rem;   /* 17px */
  --tdc-font-xl:        1.25rem;     /* 20px */
}

/* ══════════════════════════════════════════════════════════════
   RESET / BASE
══════════════════════════════════════════════════════════════ */

body.tutor-lms #main {
  background-color: #F3F5F8;
}

.tdc-dashboard *,
.tdc-dashboard *::before,
.tdc-dashboard *::after {
  box-sizing: border-box;
}

.tdc-dashboard {
  font-family: inherit;
  font-size: var(--tdc-font-base);
  color: var(--tdc-text);
  min-height: 80vh;
  max-width: 1200px;
  margin: 0 auto;
}

/* Screen-reader only */
.tdc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT – mobile first
══════════════════════════════════════════════════════════════ */

.tdc-dashboard {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Mobile top bar */
.tdc-mobile-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--tdc-card-bg);
  border-bottom: 1px solid var(--tdc-border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.tdc-mobile-bar__title {
  font-size: var(--tdc-font-lg);
  font-weight: 600;
}

/* Content area */
.tdc-content {
  flex: 1;
  padding: 30px 20px;
  min-width: 0;
  background-color: #fff;
  box-shadow: 0px 1px 4px 0px #00000014;
  margin-left: 30px;
}

.tdc-dashboard[data-current-tab="my-courses"] .tdc-content {
  background-color: transparent;
  box-shadow: none;
  padding: 0;
}

/* Overlay */
.tdc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 290;
}

.tdc-overlay--visible {
  display: block;
}

/* Desktop layout: sidebar + content side-by-side */
@media (min-width: 900px) {
  .tdc-dashboard {
    flex-direction: row;
    align-items: flex-start;
    align-items: stretch;
  }

  .tdc-mobile-bar {
    display: none;
  }

  .tdc-content {
    flex: 1;
    padding: 32px 40px 60px;
    min-width: 0;
  }

  .tdc-overlay {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */

.tdc-sidebar {
  background: var(--tdc-sidebar-bg);
  width: var(--tdc-sidebar-width);
  min-height: 100vh;
  padding: 10px;
  border-right: 1px solid var(--tdc-border);
  flex-shrink: 0;
  border-radius: 12px;

  /* Mobile: offcanvas */
  position: fixed;
  top: 0;
  left: -100%;
  z-index: 300;
  height: 100%;
  overflow-y: auto;
  transition: left var(--tdc-transition);
}

.tdc-sidebar--open {
  left: 0;
}

/* Desktop: static */
@media (min-width: 900px) {
  .tdc-sidebar {
    position: sticky;
    top: 0;
    left: auto;
    height: 100vh;
    overflow-y: auto;
    transition: none;
  }
}

/* Close button (mobile only) */
.tdc-sidebar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--tdc-text-muted);
  cursor: pointer;
  border-radius: 50%;
  margin-left: auto;
  transition: background var(--tdc-transition), color var(--tdc-transition);
}

.tdc-sidebar__close:hover {
  background: var(--tdc-bg);
  color: var(--tdc-text);
}

@media (min-width: 900px) {
  .tdc-sidebar__close {
    display: none;
  }
}

/* User strip */
.tdc-sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  margin-bottom: 12px;
  background: var(--tdc-primary-light);
  border-radius: var(--tdc-radius);
}

.tdc-sidebar__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.tdc-sidebar__avatar-img,
.tdc-sidebar__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.tdc-sidebar__user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tdc-sidebar__display-name {
  font-weight: 600;
  font-size: var(--tdc-font-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tdc-sidebar__email {
  font-size: var(--tdc-font-sm);
  color: var(--tdc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR NAVIGATION
══════════════════════════════════════════════════════════════ */

.tdc-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tdc-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--tdc-radius-pill);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  font-size: 18px;
  line-height: 1.3;
  color: #0200B9;
}

.tdc-nav__link:hover {
  background: var(--tdc-primary-light);
  color: var(--tdc-primary);
}

.tdc-nav__item--active .tdc-nav__link {
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
  color: #ffffff;
  font-weight: 700;
}

.tdc-nav__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.tdc-nav__icon svg {
  width: 20px;
  height: 20px;
}

.tdc-nav__link--logout:hover {
  background: #fee2e2;
  color: var(--tdc-danger);
}

/* ══════════════════════════════════════════════════════════════
   MOBILE SIDEBAR TOGGLE (hamburger)
══════════════════════════════════════════════════════════════ */

.tdc-sidebar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin: 0;
  min-height: unset;
}

.tdc-sidebar-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--tdc-text);
  border-radius: 2px;
  transition: transform var(--tdc-transition), opacity var(--tdc-transition);
}

/* X animation when open */
.tdc-sidebar-toggle--open .tdc-sidebar-toggle__bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.tdc-sidebar-toggle--open .tdc-sidebar-toggle__bar:nth-child(2) {
  opacity: 0;
}
.tdc-sidebar-toggle--open .tdc-sidebar-toggle__bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ══════════════════════════════════════════════════════════════
   SHARED CARD
══════════════════════════════════════════════════════════════ */

.tdc-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tdc-card__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%) text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */

.tdc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--tdc-radius-pill);
  font-size: var(--tdc-font-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--tdc-transition), color var(--tdc-transition),
              border-color var(--tdc-transition), box-shadow var(--tdc-transition);
  white-space: nowrap;
}

.tdc-btn--primary {
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 400;
  border-radius: 12px;
}

.tdc-btn--primary.done {
  background: transparent;
  color: #34C759 !important;
  font-weight: 700;
}

.tdc-btn--ghost {
  color: #007AFF;
  font-size: 16px;
  font-weight: 400;
  text-decoration: underline;
}

.tdc-btn--ghost.tdc-btn-phone {
  font-size: 16px;
  margin: 0;
  text-transform: none;
}

.tdc-btn--sm {
  padding: 5px 14px;
  font-size: 0.75rem;
}

.tdc-btn--full {
  width: 100%;
}

.tdc-btn--upgrade {
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
  color: #ffffff !important;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  padding: 16px;
  border: none;
  text-decoration: none;
}

.tdc-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════════════ */

.tdc-breadcrumb {
  margin-bottom: 20px;
}

.tdc-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--tdc-font-sm);
}

.tdc-breadcrumb__link {
  color: var(--tdc-text-muted);
  text-decoration: none;
}

.tdc-breadcrumb__link:hover {
  color: var(--tdc-primary);
}

.tdc-breadcrumb__sep {
  color: var(--tdc-text-muted);
  margin: 0 2px;
}

.tdc-breadcrumb__item--current span {
  color: var(--tdc-text);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════════════════════════
   ACCOUNT BANNER
══════════════════════════════════════════════════════════════ */

.tdc-account-banner {
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%);
  border-radius: 20px;
  padding: 40px 35px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.tdc-account-banner__shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.tdc-account-banner__shape--1 {
  width: 180px;
  height: 180px;
  background: #ffffff;
  right: -40px;
  top: -60px;
}

.tdc-account-banner__shape--2 {
  width: 100px;
  height: 100px;
  background: #ffffff;
  right: 80px;
  bottom: -30px;
}

.tdc-account-banner__shape--3 {
  width: 60px;
  height: 60px;
  background: #ffffff;
  right: 200px;
  top: 20px;
  opacity: 0.1;
}

.tdc-account-banner__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Wrapper keeps camera button outside overflow:hidden */
.tdc-account-banner__avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 124px;
  height: 124px;
}

.tdc-account-banner__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid #fff;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

/* Hidden file input */
.tdc-account-avatar-upload-input {
  display: none;
}

/* Camera button – bottom-right of avatar circle */
.tdc-account-avatar-upload-button {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  min-height: unset;
  margin: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  z-index: 10;
  padding: 0;
}

.tdc-account-avatar-upload-button:hover {
  background: #EEF1FF;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.26);
}

.tdc-account-avatar-upload-button svg {
  color: #374151;
  flex-shrink: 0;
}

/* Loading state */
.tdc-account-avatar-upload-button[data-loading="1"] {
  pointer-events: none;
  opacity: 0.7;
}

.tdc-account-banner__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tdc-account-banner__name {
  font-size: 20px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 4px;
}

.tdc-account-banner__email {
  font-size: 16px;
  font-weight: 400;
  color: #FFFFFF;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   ACCOUNT INFO TABLE
══════════════════════════════════════════════════════════════ */

.tdc-account-card {
  margin-bottom: 24px;
}

.tdc-account-table {
  margin: 0;
}

.tdc-account-table__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--tdc-border);
}

.tdc-account-table__row:last-child {
  border-bottom: none;
}

.tdc-account-table__label {
  font-size: 18px;
  color: #818181;
  font-weight: 400;
  min-width: 130px;
  flex-shrink: 0;
  text-transform: none;
}

.tdc-account-table__value {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  font-size: 20px;
  font-weight: 400;
  color: #000000;
  text-transform: none;
}

.tdc-account-table__text {
  font-weight: 500;
  word-break: break-all;
}

@media (max-width: 540px) {
  .tdc-account-table__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ══════════════════════════════════════════════════════════════
   TABS (My Courses)
══════════════════════════════════════════════════════════════ */

.tdc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tdc-tabs::-webkit-scrollbar {
  display: none;
}

.tdc-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  color: #1F1D44;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 0;
  text-transform: none;
  margin-right: 0;
  position: relative;
  transition: color var(--tdc-transition), border-color var(--tdc-transition);
}

.tdc-tabs__tab::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;;
  height: 2px;
  background: transparent;
}

.tdc-tabs__tab--active {
  font-weight: 700;
  background: linear-gradient(321.04deg, #0200B9 22.36%, #020207 77.64%) text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tdc-tabs__tab--active::before {
  background: linear-gradient(276.97deg, #0200B9 0.03%, #020207 99.97%);
}

.tdc-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--tdc-radius-pill);
  background: var(--tdc-primary-light);
  color: var(--tdc-primary);
  font-size: 0.7rem;
  font-weight: 700;
}

.tdc-tabs__tab--active .tdc-tabs__badge {
  background: var(--tdc-primary);
  color: #ffffff;
}

/* Tab panels */
.tdc-tab-panel {
  display: block;
}

.tdc-tab-panel[hidden] {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   COURSE GRID
══════════════════════════════════════════════════════════════ */

.tdc-course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .tdc-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .tdc-course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════════
   COURSE CARD
══════════════════════════════════════════════════════════════ */

.tdc-course-card {
  background: #FFFFFF;
  border: 1px solid #30358B;
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tdc-course-card__thumb-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  border-radius: 16px;
}

.tdc-course-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.tdc-course-card:hover .tdc-course-card__thumb {
  transform: scale(1.04);
}

.tdc-course-card__thumb--empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8ff, #d0d0f0);
}

.tdc-course-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 0 0;
  gap: 10px;
}

.tdc-course-card__title,
.tdc-course-card__title a {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #202020;
}

.tdc-course-card__excerpt {
  font-size: 15px;
  color: #5C5D67;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  font-weight: 400;
}

/* Meta list */
.tdc-course-card__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tdc-course-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333333;
  font-weight: 400;
}

.tdc-course-card__meta-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Progress */
.tdc-progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tdc-progress__bar {
  height: 6px;
  background: var(--tdc-border);
  border-radius: var(--tdc-radius-pill);
  overflow: hidden;
}

.tdc-progress__fill {
  height: 100%;
  width: var(--tdc-progress, 0%);
  background: var(--tdc-gradient);
  border-radius: var(--tdc-radius-pill);
  transition: width 0.5s ease;
}

.tdc-progress__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tdc-primary);
  text-align: right;
}

/* Footer */
.tdc-course-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tdc-course-card__footer .tdc-btn {
  flex: 1;
  margin: 0;
  line-height: 1;
  text-transform: none;
  font-size: 16px;
  font-weight: 400;
  min-height: unset;
}

.tdc-course-card__footer .tdc-btn-outline {
  border: 1px solid #020207;
  color: #020207;
  background: transparent;
  border-radius: 12px;
  text-decoration: none;
}

.tdc-btn--outline {
  border: 1.5px solid #d1d5db;
  color: #374151;
  background: transparent;
  border-radius: 12px;
  text-decoration: none;
}

.tdc-btn--outline:hover {
  border-color: #0200B9;
  color: #0200B9;
  background: rgba(2, 0, 185, 0.04);
}

.tdc-wishlist-unsave-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Circular progress */
.tdc-progress-circle {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdc-progress-circle__label {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: #0200B9;
  line-height: 1;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════ */

.tdc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 24px;
  text-align: center;
  color: var(--tdc-text-muted);
}

.tdc-empty-state svg {
  width: 56px;
  height: 56px;
  opacity: 0.4;
}

.tdc-empty-state__text {
  font-size: var(--tdc-font-base);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   ORDERS PAGE
══════════════════════════════════════════════════════════════ */

.tdc-page-orders__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.tdc-page-orders__title {
  font-size: var(--tdc-font-xl);
  font-weight: 700;
  margin: 0;
}

/* Table wrapper with horizontal scroll on mobile */
.tdc-orders-table-wrap {
  background: var(--tdc-card-bg);
  border-radius: var(--tdc-radius-lg);
  box-shadow: var(--tdc-shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tdc-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--tdc-font-sm);
  min-width: 420px;
}

.tdc-orders-table__head {
  border-bottom: 2px solid var(--tdc-border);
}

.tdc-orders-table__th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--tdc-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tdc-orders-table__th--right {
  text-align: right;
}

.tdc-orders-table__row {
  border-bottom: 1px solid var(--tdc-border);
  transition: background var(--tdc-transition);
}

.tdc-orders-table__row:last-child {
  border-bottom: none;
}

.tdc-orders-table__row:hover {
  background: var(--tdc-bg);
}

.tdc-orders-table__td {
  padding: 16px 20px;
  vertical-align: middle;
  font-weight: 500;
}

.tdc-orders-table__td--right {
  text-align: right;
  font-weight: 600;
}

/* Mobile card layout */
@media (max-width: 599px) {
  .tdc-orders-table,
  .tdc-orders-table thead,
  .tdc-orders-table tbody,
  .tdc-orders-table tr,
  .tdc-orders-table th,
  .tdc-orders-table td {
    display: block;
  }

  .tdc-orders-table__head {
    display: none;
  }

  .tdc-orders-table__row {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: var(--tdc-radius);
    border: 1px solid var(--tdc-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tdc-orders-table__td {
    padding: 0;
  }

  .tdc-orders-table__td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tdc-text-muted);
    margin-bottom: 3px;
  }

  .tdc-orders-table__td--right {
    text-align: left;
  }
}

/* ══════════════════════════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════════════════════════ */

.tdc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--tdc-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tdc-badge--success {
  background: var(--tdc-success-bg);
  color: var(--tdc-success);
}

.tdc-badge--failed {
  background: var(--tdc-danger-bg);
  color: var(--tdc-danger);
}

.tdc-badge--pending {
  background: var(--tdc-warning-bg);
  color: var(--tdc-warning);
}

.tdc-badge--refunded {
  background: var(--tdc-refunded-bg);
  color: var(--tdc-refunded);
}

/* ══════════════════════════════════════════════════════════════
   DROPDOWN (Sort)
══════════════════════════════════════════════════════════════ */

.tdc-dropdown {
  position: relative;
  display: inline-block;
}

.tdc-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--tdc-card-bg);
  border: 1px solid var(--tdc-border);
  border-radius: var(--tdc-radius-pill);
  font-size: var(--tdc-font-sm);
  color: var(--tdc-text);
  cursor: pointer;
  transition: border-color var(--tdc-transition);
}

.tdc-dropdown__toggle:hover {
  border-color: var(--tdc-primary);
}

.tdc-dropdown__toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--tdc-transition);
  flex-shrink: 0;
}

.tdc-dropdown--open .tdc-dropdown__toggle svg {
  transform: rotate(180deg);
}

.tdc-dropdown__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--tdc-card-bg);
  border: 1px solid var(--tdc-border);
  border-radius: var(--tdc-radius);
  box-shadow: var(--tdc-shadow);
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 160px;
  z-index: 100;
}

.tdc-dropdown--open .tdc-dropdown__menu {
  display: block;
}

.tdc-dropdown__menu li a {
  display: block;
  padding: 9px 14px;
  color: var(--tdc-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: var(--tdc-font-sm);
  transition: background var(--tdc-transition);
}

.tdc-dropdown__menu li a:hover,
.tdc-dropdown__menu li[aria-selected="true"] a {
  background: var(--tdc-primary-light);
  color: var(--tdc-primary);
}

/* ══════════════════════════════════════════════════════════════
   NOTICE
══════════════════════════════════════════════════════════════ */

.tdc-notice {
  padding: 14px 20px;
  border-radius: var(--tdc-radius);
  font-size: var(--tdc-font-sm);
}

.tdc-notice--info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #2563eb;
}

/* ══════════════════════════════════════════════════════════════
   PHONE MODAL
══════════════════════════════════════════════════════════════ */

.tdc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tdc-modal--open {
  display: flex;
}

.tdc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 122, 0.45);
  backdrop-filter: blur(2px);
}

.tdc-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 440px;
  animation: tdc-modal-in 0.22s ease;
}

@keyframes tdc-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tdc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.tdc-modal__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.tdc-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-height: unset;
  width: 32px;
  height: 32px;
  border: none;
  background: #f2f4f8;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.tdc-modal__close:hover {
  background: #e8e8ff;
  color: #0d0d7a;
}

.tdc-modal__body {
  padding: 20px 24px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tdc-modal__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1a2e;
}

.tdc-modal__input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e8eaee;
  border-radius: 12px;
  font-size: 0.9375rem;
  color: #1a1a2e;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tdc-modal__input:focus {
  border-color: #0d0d7a;
  box-shadow: 0 0 0 3px rgba(13, 13, 122, 0.1);
  background: #ffffff;
}

.tdc-modal__error {
  font-size: 0.8125rem;
  color: #dc2626;
  min-height: 18px;
  margin: 0;
}

.tdc-modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 22px;
}

.tdc-modal__cancel {
  color: #6b7280;
  border-color: #e8eaee;
}

.tdc-modal__footer .tdc-btn {
  padding-top: 0;
  padding-bottom: 0;
  text-transform: none;
  text-decoration: none;
  margin: 0;
  border-radius: 12px;
}

@media (min-width: 767px) {
  .tutor-screen-frontend-dashboard.logged-in #main {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .tdc-content {
    margin-left: 0;
  }
  .tdc-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .tdc-modal__footer {
    flex-direction: column-reverse;
  }

  .tdc-modal__footer .tdc-btn {
    width: 100%;
    justify-content: center;
  }
}
