


@layer components {
  /* Buttons */
  .tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--tg-heading-font-family);
    font-size: 16px;
    font-weight: var(--tg-fw-semi-bold);
    padding: 16px 30px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease-out;
    border: none;
  }

  .tg-btn-primary {
    background: var(--tg-theme-primary);
    color: white;
    box-shadow: 4px 6px 0px 0px var(--tg-common-color-blue);
  }

  .tg-btn-primary:hover {
    background: var(--tg-theme-secondary);
    color: var(--tg-heading-color);
    box-shadow: 0px 0px 0px 0px var(--tg-common-color-blue);
  }

  .tg-btn-secondary {
    background: var(--tg-theme-secondary);
    color: var(--tg-heading-color);
    border: 2px solid var(--tg-common-color-black-3);
    box-shadow: 4px 4px 0px 0px #3D3D3D;
  }

  .tg-btn-secondary:hover {
    background: var(--tg-theme-primary);
    color: white;
    box-shadow: 0px 0px 0px 0px #3D3D3D;
  }

  .tg-btn-border {
    background: white;
    border: 1px solid var(--tg-theme-primary);
    color: var(--tg-theme-primary);
    box-shadow: none;
  }

  .tg-btn-border:hover {
    background: var(--tg-theme-primary);
    color: white;
    box-shadow: 4px 6px 0px 0px var(--tg-common-color-blue);
  }

  .tg-btn-sm {
    padding: 10px 22px;
    font-size: 14px;
  }

  /* Cards */
  .tg-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #B5B5C3;
    padding: 25px;
    transition: all 0.3s ease-out;
  }

  .tg-card:hover {
    filter: drop-shadow(10px 10px 0px #CAC9D6);
  }

  .tg-card-flat {
    background: white;
    border-radius: 15px;
    border: 1px solid var(--tg-border-7);
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
    padding: 25px;
    transition: all 0.3s ease-out;
  }

  .tg-card-flat:hover {
    transform: translateY(-3px);
  }

  /* Forms */
  .tg-form-grp {
    margin-bottom: 20px;
  }

  .tg-form-grp label {
    display: block;
    font-family: var(--tg-heading-font-family);
    font-weight: var(--tg-fw-medium);
    color: var(--tg-heading-color);
    margin-bottom: 8px;
    font-size: 15px;
  }

  .tg-form-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-family: var(--tg-body-font-family);
    color: var(--tg-heading-color);
    border: 1px solid #E1E1E1;
    background: white;
    border-radius: 5px;
    transition: all 0.3s ease-out;
    outline: none;
  }

  .tg-form-input:focus {
    border-color: var(--tg-theme-primary);
  }

  .tg-form-input::placeholder {
    color: var(--tg-common-color-gray-3);
  }

  .tg-form-select {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-family: var(--tg-body-font-family);
    color: var(--tg-heading-color);
    border: 1px solid #E1E1E1;
    background: white;
    border-radius: 5px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 20px;
  }

  /* Section Title */
  .tg-section-title {
    text-align: center;
    margin-bottom: 50px;
  }

  .tg-section-title .sub-title {
    display: inline-block;
    font-family: var(--tg-heading-font-family);
    font-size: 15px;
    font-weight: var(--tg-fw-medium);
    color: var(--tg-theme-primary);
    background: var(--tg-common-color-gray-2);
    border-radius: 50px;
    padding: 6px 18px;
    margin-bottom: 12px;
  }

  .tg-section-title .title {
    font-size: 2.25rem;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-heading-color);
    margin-bottom: 15px;
    line-height: 1.3;
  }

  .tg-section-title .desc {
    font-size: 16px;
    color: var(--tg-body-color);
    max-width: 600px;
    margin: 0 auto;
  }

  /* Breadcrumb */
  .tg-breadcrumb {
    position: relative;
    background: var(--tg-common-color-gray);
    padding: 100px 0 90px;
    overflow: hidden;
    text-align: center;
  }

  .tg-breadcrumb-title {
    font-size: 2.5rem;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    margin-bottom: 15px;
  }

  .tg-breadcrumb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    color: var(--tg-body-color);
  }

  .tg-breadcrumb-nav a {
    color: var(--tg-body-color);
  }

  .tg-breadcrumb-nav a:hover {
    color: var(--tg-theme-primary);
  }

  /* Badges */
  .tg-badge {
    background: linear-gradient(90deg, #ff1515 0%, #ed0fbc 100%);
    color: white;
    font-weight: var(--tg-fw-semi-bold);
    font-size: 13px;
    border-radius: 3px;
    padding: 3px 8px;
    display: inline-block;
  }

  .tg-badge-new {
    background: #39cabd;
    color: white;
    font-weight: var(--tg-fw-semi-bold);
    font-size: 13px;
    border-radius: 3px;
    padding: 3px 8px;
    display: inline-block;
  }

  /* Tables */
  .tg-table {
    width: 100%;
    border-collapse: collapse;
  }

  .tg-table thead th {
    background: #F3F3F9;
    font-family: var(--tg-heading-font-family);
    font-weight: var(--tg-fw-bold);
    font-size: 15px;
    color: var(--tg-heading-color);
    padding: 14px 20px;
    text-align: left;
  }

  .tg-table tbody td {
    padding: 16px 20px;
    border-top: 1px solid #ebebeb;
    font-size: 15px;
    color: var(--tg-body-color);
  }

  .tg-table tbody tr:nth-child(even) {
    background: var(--tg-common-color-gray);
  }

  /* Progress Bar */
  .tg-progress-bar {
    height: 8px;
    background: #E9E7FF;
    border-radius: 50px;
    overflow: hidden;
  }

  .tg-progress-bar-fill {
    height: 100%;
    background: var(--tg-theme-primary);
    border-radius: 50px;
    transition: width 0.5s ease;
  }

  /* Dashboard */
  .tg-dashboard-sidebar {
    background: white;
    border-radius: 15px;
    border: 1px solid var(--tg-border-7);
    padding: 30px 20px;
    position: sticky;
    top: 120px;
  }

  .tg-dashboard-sidebar-title {
    font-family: var(--tg-heading-font-family);
    font-size: 14px;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-common-color-gray-3);
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-left: 15px;
  }

  .tg-dashboard-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
  }

  .tg-dashboard-sidebar-menu li {
    margin-bottom: 5px;
  }

  .tg-dashboard-sidebar-menu li a,
  .tg-dashboard-sidebar-menu li button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    font-family: var(--tg-heading-font-family);
    font-size: 15px;
    font-weight: var(--tg-fw-medium);
    color: var(--tg-heading-color);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
  }

  .tg-dashboard-sidebar-menu li a:hover,
  .tg-dashboard-sidebar-menu li button:hover {
    background: var(--tg-common-color-gray);
    color: var(--tg-theme-primary);
  }

  .tg-dashboard-sidebar-menu li.active a,
  .tg-dashboard-sidebar-menu li.active button {
    background: #E9E7FF;
    color: var(--tg-theme-primary);
  }

  .tg-dashboard-content {
    background: white;
    border-radius: 15px;
    border: 1px solid var(--tg-border-7);
    padding: 30px;
    min-height: 600px;
  }

  .tg-dashboard-counter {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: 15px;
    border: 1px solid var(--tg-border-7);
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
    padding: 25px;
    transition: all 0.3s ease;
  }

  .tg-dashboard-counter:hover {
    transform: translateY(-3px);
  }

  .tg-dashboard-counter-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--tg-common-color-gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .tg-dashboard-counter-value {
    font-family: var(--tg-heading-font-family);
    font-size: 1.75rem;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    line-height: 1;
  }

  .tg-dashboard-counter-label {
    font-size: 14px;
    color: var(--tg-body-color);
    margin-top: 4px;
  }

  /* Header */
  .tg-header-top {
    background: var(--tg-common-color-black-2);
    padding: 10px 0;
    font-size: 14px;
    color: var(--tg-common-color-gray-4);
  }

  .tg-header-top a {
    color: var(--tg-common-color-gray-4);
  }

  .tg-header-top a:hover {
    color: var(--tg-theme-secondary);
  }

  .tg-header-area {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .tg-logo {
    font-family: var(--tg-heading-font-family);
    font-size: 1.5rem;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
  }

  .tg-nav-link {
    font-family: var(--tg-heading-font-family);
    font-size: 15px;
    font-weight: var(--tg-fw-medium);
    color: var(--tg-heading-color);
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
  }

  .tg-nav-link:hover,
  .tg-nav-link.active {
    color: var(--tg-theme-primary);
    background: var(--tg-common-color-gray-2);
  }

  .tg-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 450px;
    border-radius: 100px;
    border: 1px solid #D3D2DF;
    overflow: hidden;
  }

  .tg-search-form input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
  }

  .tg-search-form button {
    padding: 10px 20px;
    background: var(--tg-theme-primary);
    color: white;
    border: none;
    cursor: pointer;
  }

  /* Footer */
  .tg-footer-top {
    background: var(--tg-common-color-black);
    padding: 80px 0 50px;
    color: var(--tg-common-color-gray-4);
  }

  .tg-footer-title {
    font-family: var(--tg-heading-font-family);
    font-size: 1.25rem;
    font-weight: var(--tg-fw-semi-bold);
    color: white;
    margin-bottom: 25px;
  }

  .tg-footer-link {
    color: var(--tg-common-color-gray-5);
    font-size: 15px;
    display: block;
    margin-bottom: 12px;
    transition: all 0.3s ease;
  }

  .tg-footer-link:hover {
    color: var(--tg-theme-secondary);
    padding-left: 5px;
  }

  .tg-footer-bottom {
    background: var(--tg-common-color-dark);
    padding: 25px 0;
    color: var(--tg-common-color-gray-4);
    font-size: 14px;
  }

  /* Auth Forms */
  .tg-auth-wrap {
    background: #F7F7FA;
    border: 1px solid #E2E2E2;
    border-radius: 8px;
    padding: 40px 50px 50px;
  }

  .tg-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    color: var(--tg-common-color-gray-3);
    font-size: 14px;
  }

  .tg-divider::before,
  .tg-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E2E2;
  }

  /* Tab */
  .tg-tab-btn {
    padding: 12px 24px;
    font-family: var(--tg-heading-font-family);
    font-size: 15px;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-heading-color);
    border-bottom: 2px solid transparent;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .tg-tab-btn:hover {
    color: var(--tg-theme-primary);
  }

  .tg-tab-btn.active {
    color: var(--tg-theme-primary);
    border-bottom-color: var(--tg-theme-primary);
  }

  /* Cart */
  .tg-cart-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: var(--tg-common-color-gray);
    overflow: hidden;
    flex-shrink: 0;
  }

  .tg-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tg-cart-qty {
    display: flex;
    align-items: center;
    border: 1px solid #E1E1E1;
    border-radius: 5px;
    overflow: hidden;
    max-width: 120px;
  }

  .tg-cart-qty button {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--tg-heading-color);
    transition: all 0.3s ease;
  }

  .tg-cart-qty button:hover {
    background: var(--tg-common-color-gray);
  }

  .tg-cart-qty input {
    width: 48px;
    height: 36px;
    border: none;
    text-align: center;
    font-family: var(--tg-heading-font-family);
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-heading-color);
    outline: none;
  }

  /* Avatars */
  .tg-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }

  .tg-avatar-lg {
    width: 100px;
    height: 100px;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }

  .tg-avatar-sm {
    width: 45px;
    height: 45px;
  }

  /* Rating */
  .tg-rating {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .tg-rating-star {
    color: #FFB800;
    font-size: 14px;
  }

  /* Meta Items */
  .tg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--tg-body-color);
  }

  .tg-meta svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }

  /* Courses Sidebar Widgets */
  .widget-title {
    font-family: var(--tg-heading-font-family);
    font-size: 18px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tg-border-7);
  }

  .courses-cat-list .list-wrap {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .courses-cat-list .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .courses-cat-list .form-check-input {
    width: 18px;
    height: 18px;
    border: 1px solid var(--tg-border-3);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--tg-theme-primary);
  }

  .courses-cat-list .form-check-label {
    font-size: 15px;
    color: var(--tg-body-color);
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .courses-cat-list .form-check-label:hover {
    color: var(--tg-theme-primary);
  }

  /* Course Card */
  .courses__item {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--tg-border-7);
    overflow: hidden;
    transition: all 0.3s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .courses__item:hover {
    filter: drop-shadow(10px 10px 0px #CAC9D6);
  }

  .courses__item-thumb {
    position: relative;
    overflow: hidden;
    height: 200px;
  }

  .shine__animate-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
  }

  .shine__animate-link::before {
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 2;
    display: block;
    content: '';
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
    transform: skewX(-25deg);
    transition: none;
  }

  .courses__item:hover .shine__animate-link::before {
    animation: shine 0.75s;
  }

  @keyframes shine {
    100% {
      left: 125%;
    }
  }

  .courses__item-content {
    padding: 20px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .courses__item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    list-style: none;
    padding: 0;
  }

  .courses__item-tag a {
    display: inline-block;
    background: var(--tg-common-color-gray-2);
    color: var(--tg-theme-primary);
    font-size: 13px;
    font-weight: var(--tg-fw-medium);
    padding: 5px 14px;
    border-radius: 50px;
    transition: all 0.3s ease;
  }

  .courses__item-tag a:hover {
    background: var(--tg-theme-primary);
    color: white;
  }

  .courses__item-content .title {
    font-size: 18px;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-heading-color);
    margin-bottom: 8px;
    line-height: 1.4;
  }

  .courses__item-content .title a {
    color: inherit;
  }

  .courses__item-content .title a:hover {
    color: var(--tg-theme-primary);
  }

  .courses__item-content .author {
    font-size: 14px;
    color: var(--tg-body-color);
    margin-bottom: 16px;
  }

  .courses__item-content .author a {
    color: var(--tg-heading-color);
    font-weight: var(--tg-fw-medium);
  }

  .courses__item-bottom {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--tg-border-7);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .courses__item-bottom .button a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--tg-heading-font-family);
    font-size: 14px;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-theme-primary);
    transition: all 0.3s ease;
  }

  .courses__item-bottom .button a:hover {
    color: var(--tg-theme-secondary);
    gap: 10px;
  }

  .courses__item-bottom .price {
    font-family: var(--tg-heading-font-family);
    font-size: 20px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-theme-primary);
    margin: 0;
  }

  /* Courses Top Bar */
  .courses-top-wrap {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--tg-border-7);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Course Detail */
  .courses__details-thumb {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
  }

  .courses__details-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .courses__details-video {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
  }

  .courses__details-video img {
    width: 100%;
    height: auto;
    display: block;
  }

  .courses__cost-wrap {
    text-align: center;
  }

  .courses__cost-wrap .title {
    font-family: var(--tg-heading-font-family);
    font-size: 28px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    margin: 0;
  }

  .courses__information-wrap .title {
    font-family: var(--tg-heading-font-family);
    font-size: 16px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    margin-bottom: 14px;
  }

  .courses__information-wrap .list-wrap {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .courses__information-wrap li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--tg-border-7);
    font-size: 15px;
  }

  .courses__information-wrap li:last-child {
    border-bottom: none;
  }

  .courses__details-social .list-wrap {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
  }

  .courses__details-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tg-common-color-gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tg-theme-primary);
    font-size: 14px;
    transition: all 0.3s ease;
  }

  .courses__details-social a:hover {
    background: var(--tg-theme-primary);
    color: white;
  }

  /* Accordion */
  .accordion {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .accordion-item {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--tg-border-7);
    overflow: hidden;
  }

  .accordion-button {
    background: var(--tg-common-color-gray);
    border: none;
    width: 100%;
    padding: 16px 20px;
    font-family: var(--tg-heading-font-family);
    font-size: 16px;
    font-weight: var(--tg-fw-semi-bold);
    color: var(--tg-heading-color);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
  }

  .accordion-button:hover {
    background: var(--tg-common-color-gray-2);
  }

  .accordion-body {
    padding: 16px 20px;
  }

  .course-item {
    list-style: none;
  }

  .course-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--tg-heading-color);
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 15px;
  }

  .course-item-link:hover {
    background: var(--tg-common-color-gray);
  }

  .course-item-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .course-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .item-meta {
    font-size: 13px;
    color: var(--tg-body-color);
  }

  /* Overview */
  .about__info-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .about__info-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
  }

  /* Instructors */
  .courses__instructors-content .title {
    font-size: 20px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    margin-bottom: 4px;
  }

  .courses__instructors-content .designation {
    display: block;
    color: var(--tg-theme-primary);
    font-size: 14px;
    font-weight: var(--tg-fw-medium);
    margin-bottom: 10px;
  }

  /* Reviews / Rating */
  .course-rate {
    display: flex;
    gap: 30px;
    align-items: center;
  }

  .course-rate__summary {
    text-align: center;
    min-width: 120px;
  }

  .course-rate__summary-value {
    font-family: var(--tg-heading-font-family);
    font-size: 48px;
    font-weight: var(--tg-fw-bold);
    color: var(--tg-heading-color);
    line-height: 1;
    margin-bottom: 8px;
  }

  .course-rate__summary-stars {
    color: #FFB800;
    margin-bottom: 6px;
  }

  .course-rate__details {
    flex: 1;
  }

  .course-rate__details-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  .course-rate__details-row-star {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: var(--tg-fw-medium);
    color: var(--tg-heading-color);
    width: 36px;
  }

  .rating-gray {
    flex: 1;
    height: 6px;
    background: #E9E7FF;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
  }

  .rating-gray .rating {
    height: 100%;
    background: #FFB800;
    border-radius: 50px;
  }

  .rating-count {
    font-size: 14px;
    color: var(--tg-body-color);
    min-width: 24px;
    text-align: right;
  }
}

@layer utilities {
  .text-primary-custom {
    color: var(--tg-theme-primary);
  }

  .text-heading {
    color: var(--tg-heading-color);
  }

  .bg-primary-custom {
    background-color: var(--tg-theme-primary);
  }

  .font-heading {
    font-family: var(--tg-heading-font-family);
  }
}

/* =============================================
   Mobile Responsive Overrides
   ============================================== */

/* Mobile menu state fallback */
.tgmobile__menu.mobile-open {
  -webkit-transform: translateX(0%);
  -moz-transform: translateX(0%);
  -ms-transform: translateX(0%);
  -o-transform: translateX(0%);
  transform: translateX(0%);
}
.tgmobile__menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile menu submenu toggle */
.tgmobile__menu .navigation li.menu-item-has-children .sub-menu {
  display: none;
}
.tgmobile__menu .navigation li.menu-item-has-children .sub-menu[style*="block"] {
  display: block !important;
}

/* Dashboard mobile fixes */
@media (max-width: 991.98px) {
  .tg-dashboard-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 20px;
  }
}

/* Cart & Checkout mobile table fixes */
@media (max-width: 767.98px) {
  /* Force cart table to be scrollable */
  .tg-table {
    min-width: 600px;
  }

  /* Make auth forms fit on small screens */
  .tg-auth-wrap {
    padding: 25px 20px 30px;
  }

  /* Banner alignments */
  .banner__images {
    text-align: center;
  }
  .banner__images .main-img {
    max-width: 85% !important;
    margin: 0 auto;
  }
  .banner__author {
    display: none;
  }

  /* Newsletter fixes */
  .newsletter__img-wrap {
    display: none;
  }
  .newsletter__content {
    text-align: center;
  }
  .newsletter__content .title br {
    display: none;
  }
  .newsletter__form form {
    flex-direction: column;
    gap: 10px;
  }
  .newsletter__form form input {
    border-radius: 4px !important;
  }
  .newsletter__form form button {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    border-radius: 4px !important;
    width: 100%;
  }

  /* Footer app download */
  .app-download {
    flex-direction: column;
    display: flex;
    gap: 8px;
    align-items: flex-start;
  }

  /* Courses sidebar on mobile */
  .courses__sidebar {
    margin-bottom: 30px;
  }
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Fix horizontal overflow */
html, body {
  overflow-x: hidden;
}

/* Tablet/mobile login button visibility fix */
@media (max-width: 1199.98px) {
  .mobile-login-btn {
    display: flex !important;
    margin-left: auto;
  }
}

/* Mobile breadcrumb */
@media (max-width: 767.98px) {
  .tg-breadcrumb {
    padding: 60px 0 50px !important;
  }
  .tg-breadcrumb-title {
    font-size: 1.75rem !important;
  }
}

/* Better touch targets on mobile */
@media (max-width: 767.98px) {
  .navigation li > a {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .courses__item-bottom .button a,
  .btn {
    min-height: 44px;
  }
}

/* Dashboard table mobile */
@media (max-width: 767.98px) {
  .tg-table thead th,
  .tg-table tbody td {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* ============================================================
   DASHBOARD V2 — Form Styles, Loader, Toast, Avatar Upload
   ============================================================ */

/* ---- Global busy overlay ---- */
.tf-loader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tfFadeIn 0.2s ease;
}

.tf-loader-box {
  background: white;
  border-radius: 16px;
  padding: 36px 48px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.18);
  max-width: 90vw;
}

.tf-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E9E7FF;
  border-top-color: var(--tg-theme-primary);
  border-radius: 50%;
  animation: tfSpin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.tf-spinner-sm {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: tfSpin 0.7s linear infinite;
}

@keyframes tfSpin {
  to { transform: rotate(360deg); }
}

@keyframes tfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tf-loader-text {
  font-family: var(--tg-heading-font-family);
  font-weight: var(--tg-fw-semi-bold);
  color: var(--tg-heading-color);
  font-size: 16px;
  margin: 0;
}

/* ---- Toast notifications ---- */
.tf-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9998;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--tg-heading-font-family);
  font-weight: var(--tg-fw-medium);
  font-size: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  animation: tfSlideIn 0.35s ease, tfFadeOut 0.4s ease 3.1s forwards;
  max-width: 380px;
  line-height: 1.5;
}

.tf-toast-ok  { background: #12BB6A; }
.tf-toast-err { background: #E11B24; }

@keyframes tfSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

@keyframes tfFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ---- Form card container ---- */
.tf-form-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--tg-border-7);
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

@media (max-width: 767.98px) {
  .tf-form-card { padding: 20px 18px; }
}

/* ---- Vertical form stack ---- */
.tf-form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Form row grid ---- */
.tf-form-row {
  row-gap: 18px;
}

/* ---- Individual form group ---- */
.tf-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tf-form-group label {
  font-family: var(--tg-heading-font-family);
  font-weight: var(--tg-fw-medium);
  font-size: 14px;
  color: var(--tg-heading-color);
  margin: 0;
}

.tf-required { color: #E11B24; margin-left: 2px; }

/* ---- Inputs ---- */
.tf-input,
.tf-select,
.tf-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--tg-body-font-family);
  color: var(--tg-heading-color);
  background: #FAFAFB;
  border: 1px solid #E1E1E8;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1.5;
}

.tf-input:focus,
.tf-select:focus,
.tf-textarea:focus {
  border-color: var(--tg-theme-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.08);
}

.tf-input::placeholder,
.tf-textarea::placeholder {
  color: #9CA3AF;
}

.tf-input-readonly {
  background: #F3F4F6 !important;
  color: #6B7280 !important;
  cursor: not-allowed;
  border-color: #E5E7EB !important;
  box-shadow: none !important;
}

.tf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 40px;
}

.tf-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ---- File input label ---- */
.tf-file-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---- Hint / helper text ---- */
.tf-hint-text {
  font-size: 13px;
  color: #9CA3AF;
  margin: 6px 0 0;
}

.tf-empty-text {
  color: #9CA3AF;
  font-size: 15px;
  padding: 20px 0;
}

.tf-body-text {
  color: var(--tg-body-color);
}

/* ---- Section subtitle ---- */
.tf-section-subtitle {
  font-family: var(--tg-heading-font-family);
  font-weight: var(--tg-fw-bold);
  font-size: 16px;
  color: var(--tg-heading-color);
  margin: 0;
}

/* ---- Divider ---- */
.tf-divider {
  border: none;
  border-top: 1px solid var(--tg-border-7);
  margin: 32px 0;
}

/* ---- Avatar section ---- */
.tf-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tf-avatar-preview-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--tg-border-7);
  flex-shrink: 0;
}

.tf-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tf-avatar-uploading {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tf-avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* ---- Chapter rows ---- */
.tf-chapter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* ---- Muted button ---- */
.tf-btn-muted {
  color: #9CA3AF !important;
  border-color: #E5E7EB !important;
}
.tf-btn-muted:hover {
  color: #6B7280 !important;
  background: #F3F4F6 !important;
}

/* ---- Fade in utility ---- */
.tf-fade-in {
  animation: tfFadeIn 0.4s ease;
}

/* ============================================================
   Layout fix — prevent components sitting on each other
   ============================================================ */

.dashboard__content-wrap {
  margin-bottom: 24px;
}

.dashboard__content-title {
  margin-bottom: 20px;
}

.dashboard__content-title .title {
  margin: 0;
}

/* Spacing between consecutive form cards */
.tf-form-card + .tf-form-card {
  margin-top: 24px;
}

/* Ensure alerts inside cards don't touch edges */
.alert {
  margin-bottom: 0;
}

/* Fix for table responsiveness inside dashboard */
.table-responsive {
  border-radius: 8px;
  border: 1px solid var(--tg-border-7);
  overflow: hidden;
}

.table-responsive table {
  margin-bottom: 0;
}

/* ============================================================
   Modern Input Styling — premium feel with soft shadows & focus
   ============================================================ */

.tf-input,
.tf-select,
.tf-textarea {
  background: #F8F8FA;
  border: 1.5px solid #E1E1E8;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--tg-heading-color);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tf-input:hover:not(:focus):not(.tf-input-readonly),
.tf-select:hover:not(:focus):not(.tf-input-readonly),
.tf-textarea:hover:not(:focus):not(.tf-input-readonly) {
  border-color: #C4C4D4;
  background: #FAFAFC;
}

.tf-input:focus,
.tf-select:focus,
.tf-textarea:focus {
  border-color: var(--tg-theme-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(87, 81, 225, 0.10), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.tf-input::placeholder,
.tf-textarea::placeholder {
  color: #A1A1B3;
}

.tf-input-readonly {
  background: #F1F1F5 !important;
  color: #8A8A9A !important;
  border-color: #E1E1E8 !important;
  box-shadow: none !important;
}

/* Ensure selects keep custom arrow */
.tf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 42px;
}

/* ============================================================
   Button inline spinner — same design-system styling
   ============================================================ */

.tf-spinner-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: tfSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================
   Settings section spacing — prevent overlap
   ============================================================ */

.tf-settings-section {
  padding: 28px 0;
}

.tf-settings-section:first-of-type {
  padding-top: 0;
}

.tf-settings-section:last-of-type {
  padding-bottom: 0;
}

.tf-settings-section + .tf-settings-section {
  border-top: 1px solid var(--tg-border-7);
}

/* Fix alerts inside flex form stacks so they don't collapse */
.tf-form-stack .alert {
  margin: 4px 0;
}

/* Ensure Show conditional blocks don't collapse margins */
.tf-conditional-block {
  display: block;
  width: 100%;
}

/* ============================================================
   Mobile responsive settings
   ============================================================ */

@media (max-width: 767.98px) {
  .tf-input,
  .tf-select,
  .tf-textarea {
    padding: 12px 14px;
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

/* ============================================================
   Dashboard top banner avatar — force circular crop
   ============================================================ */

.dashboard__instructor-info .thumb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.dashboard__instructor-info .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

