/* ==========================================================================
   University Thesis Portlet Stylesheet - Formal Academic & Modern UX Theme
   ========================================================================== */
/* ---------- Color Tokens & Variables ---------- */
/* ---------- Base layout containers ---------- */
.thesis-list-container,
.thesis-details-container {
  font-family: inherit;
  color: #334155; }

/* ---------- Language switcher ---------- */
.thesis-lang-switch {
  margin-bottom: 1.5rem;
  text-align: right; }
  .thesis-lang-switch .thesis-lang-switch-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease; }
    .thesis-lang-switch .thesis-lang-switch-link i {
      margin-left: 0.35rem;
      font-size: 0.95rem; }
    .thesis-lang-switch .thesis-lang-switch-link:hover {
      color: #1e3a8a;
      background-color: #ffffff;
      border-color: #8ea5e6;
      box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
      text-decoration: none; }

/* ---------- Page header title ---------- */
.thesis-page-title {
  font-weight: 700;
  font-size: 1.75rem;
  color: #0f172a;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  letter-spacing: -0.02em; }
  .thesis-page-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #d97706);
    margin: 0.75rem auto 0;
    border-radius: 2px; }

/* ---------- Segmented Tabs (Past / Future) ---------- */
.thesis-tabs {
  border-bottom: none;
  background-color: #f1f5f9;
  padding: 0.35rem;
  border-radius: 30px;
  display: inline-flex;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto 2rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04); }
  .thesis-tabs .nav-item {
    margin-bottom: 0; }
  .thesis-tabs .nav-link {
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent; }
    .thesis-tabs .nav-link:hover {
      color: #0f172a;
      background-color: rgba(255, 255, 255, 0.6); }
    .thesis-tabs .nav-link.active {
      color: #ffffff;
      background-color: #1e3a8a;
      box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25); }

/* ---------- Filter Card & Controls ---------- */
.thesis-filters-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: box-shadow 0.3s ease, border-color 0.3s ease; }
  .thesis-filters-card:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    border-color: #d1dbe7; }
  .thesis-filters-card .control-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: block; }

.thesis-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  /* ---------- Search button positioned inside input ---------- */ }
  .thesis-search-wrapper .thesis-search-input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    padding: 0.55rem 2.5rem 0.55rem 0.85rem;
    font-size: 0.9rem;
    height: auto;
    width: 100%;
    transition: all 0.25s ease; }
    .thesis-search-wrapper .thesis-search-input:focus {
      background-color: #ffffff;
      border-color: #1e3a8a;
      box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
      outline: none; }
  .thesis-search-wrapper .thesis-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease; }
    .thesis-search-wrapper .thesis-search-btn:hover {
      color: #1e3a8a;
      background-color: #f1f5f9; }
    .thesis-search-wrapper .thesis-search-btn .thesis-search-icon {
      font-size: 1.05rem; }

/* ---------- RTL search input adjustments ---------- */
html[dir="rtl"] .thesis-search-wrapper .thesis-search-input,
body.rtl .thesis-search-wrapper .thesis-search-input,
.rtl .thesis-search-wrapper .thesis-search-input {
  padding: 0.55rem 0.85rem 0.55rem 2.5rem; }

html[dir="rtl"] .thesis-search-wrapper .thesis-search-btn,
body.rtl .thesis-search-wrapper .thesis-search-btn,
.rtl .thesis-search-wrapper .thesis-search-btn {
  right: auto;
  left: 6px; }

.thesis-select-input {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  height: auto;
  width: 100%;
  transition: all 0.25s ease; }
  .thesis-select-input:focus {
    background-color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
    outline: none; }

/* ---------- Hidden container helper ---------- */
.thesis-container-hidden {
  display: none !important; }

/* ---------- Thesis Grid & Cards (Modern 9.5/10 UX & Hierarchy) ---------- */
.thesis-list {
  margin-left: -10px;
  margin-right: -10px; }
  .thesis-list [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px; }

.thesis-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer; }
  .thesis-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    border-color: #cbd5e1; }
    .thesis-card:hover .thesis-card-footer {
      color: #1e3a8a;
      background-color: #f1f5f9; }
      .thesis-card:hover .thesis-card-footer .footer-action-icon {
        transform: translateX(-4px); }
  .thesis-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    text-align: right;
    /* ---------- RTL default alignment ---------- */ }
  .thesis-card .thesis-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem; }
    .thesis-card .thesis-card-header .student-avatar-sm {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #f1f5f9;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #ffffff;
      box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
      overflow: hidden;
      flex-shrink: 0; }
      .thesis-card .thesis-card-header .student-avatar-sm .student-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%; }
      .thesis-card .thesis-card-header .student-avatar-sm .student-avatar-icon {
        font-size: 1.15rem;
        color: #64748b; }
    .thesis-card .thesis-card-header .student-name-header {
      font-size: 0.95rem;
      font-weight: 700;
      color: #0f172a;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap; }
      .thesis-card .thesis-card-header .student-name-header .header-student-icon {
        margin-left: 0.3rem;
        color: #1e3a8a;
        font-size: 0.9rem; }
  .thesis-card .thesis-title {
    font-weight: 700;
    line-height: 1.45;
    font-size: 1.025rem;
    color: #0f172a;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 2; }
    .thesis-card .thesis-title .thesis-title-link {
      color: #0f172a;
      text-decoration: none;
      transition: color 0.2s ease; }
      .thesis-card .thesis-title .thesis-title-link:hover {
        color: #1e3a8a;
        text-decoration: none; }
  .thesis-card .thesis-card-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin-top: auto;
    margin-bottom: 0.75rem; }
  .thesis-card .thesis-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.5rem; }
    .thesis-card .thesis-info-list .info-row {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      font-size: 0.85rem;
      color: #475569; }
      .thesis-card .thesis-info-list .info-row .info-icon {
        font-size: 0.9rem;
        color: #64748b;
        width: 16px;
        text-align: center;
        flex-shrink: 0; }
      .thesis-card .thesis-info-list .info-row .info-label {
        font-weight: 500;
        color: #64748b;
        font-size: 0.825rem;
        flex-shrink: 0; }
      .thesis-card .thesis-info-list .info-row .info-value {
        color: #334155;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap; }
      .thesis-card .thesis-info-list .info-row.dept-row .info-icon {
        color: #d97706; }
      .thesis-card .thesis-info-list .info-row.supervisor-row .info-icon {
        color: #1e3a8a; }
      .thesis-card .thesis-info-list .info-row.date-row .info-value {
        color: #475569;
        font-size: 0.825rem;
        font-weight: 500; }
  .thesis-card .thesis-card-footer {
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    font-weight: 600;
    color: #64748b;
    background-color: #fafbfc;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
    transition: all 0.2s ease; }
    .thesis-card .thesis-card-footer .footer-action-icon {
      font-size: 0.85rem;
      transition: transform 0.2s ease; }

/* ---------- LTR direction adjustments ---------- */
html[dir="ltr"] .thesis-card .card-body,
body.ltr .thesis-card .card-body,
.ltr .thesis-card .card-body {
  text-align: left; }

html[dir="ltr"] .thesis-card:hover .thesis-card-footer .footer-action-icon,
body.ltr .thesis-card:hover .thesis-card-footer .footer-action-icon,
.ltr .thesis-card:hover .thesis-card-footer .footer-action-icon {
  transform: translateX(4px); }

/* ---------- Empty state styling ---------- */
.thesis-empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
  background-color: #ffffff;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  margin: 1rem 0; }
  .thesis-empty-state .thesis-empty-icon {
    font-size: 3rem;
    color: #64748b;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.6; }
  .thesis-empty-state .thesis-empty-text {
    color: #475569;
    font-size: 1rem;
    font-weight: 500;
    margin: 0; }

/* ---------- Thesis details view ---------- */
.thesis-details-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden; }

.thesis-details-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc; }
  .thesis-details-header .thesis-section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1e3a8a;
    background-color: #c0cdf1;
    padding: 0.3rem 0.75rem;
    border-radius: 20px; }
  .thesis-details-header .thesis-date-badge {
    font-size: 0.85rem;
    color: #475569;
    display: inline-flex;
    align-items: center; }
    .thesis-details-header .thesis-date-badge i {
      margin-right: 0.4rem;
      color: #d97706; }
    .thesis-details-header .thesis-date-badge .date-label {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #64748b;
      margin-right: 0.35rem; }
    .thesis-details-header .thesis-date-badge .date-value {
      font-weight: 700;
      color: #0f172a; }

.thesis-meta-box {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0; }
  .thesis-meta-box .thesis-student-sidebar {
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 2.5rem 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; }
    .thesis-meta-box .thesis-student-sidebar .thesis-avatar-lg {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      overflow: hidden;
      background-color: #ffffff;
      border: 4px solid #ffffff;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
      margin-bottom: 1.25rem;
      display: flex;
      align-items: center;
      justify-content: center; }
      .thesis-meta-box .thesis-student-sidebar .thesis-avatar-lg img {
        width: 100%;
        height: 100%;
        object-fit: cover; }
      .thesis-meta-box .thesis-student-sidebar .thesis-avatar-lg i {
        font-size: 4rem;
        color: #64748b; }
    .thesis-meta-box .thesis-student-sidebar .student-label {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #64748b;
      margin-bottom: 0.25rem;
      display: block; }
    .thesis-meta-box .thesis-student-sidebar .student-name {
      font-size: 1.25rem;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 1rem; }
    .thesis-meta-box .thesis-student-sidebar .dept-program-box {
      background-color: #ffffff;
      border: 1px solid #e2e8f0;
      padding: 0.85rem 1rem;
      border-radius: 10px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
      width: 100%; }
      .thesis-meta-box .thesis-student-sidebar .dept-program-box .box-label {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
        margin-bottom: 0.35rem;
        display: block; }
      .thesis-meta-box .thesis-student-sidebar .dept-program-box .box-value {
        font-size: 0.9rem;
        font-weight: 600;
        color: #334155; }
  .thesis-meta-box .thesis-details-main {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center; }
    .thesis-meta-box .thesis-details-main .thesis-hero-title {
      font-size: 1.45rem;
      font-weight: 700;
      line-height: 1.55;
      color: #0f172a;
      margin-bottom: 1.75rem;
      padding-bottom: 1.25rem;
      border-bottom: 1px solid #e2e8f0; }
    .thesis-meta-box .thesis-details-main .thesis-role-item {
      padding-bottom: 1.25rem;
      margin-bottom: 1.25rem;
      border-bottom: 1px solid #eff3f7; }
      .thesis-meta-box .thesis-details-main .thesis-role-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0; }
      .thesis-meta-box .thesis-details-main .thesis-role-item .role-label {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #64748b;
        margin-bottom: 0.35rem;
        display: block; }
      .thesis-meta-box .thesis-details-main .thesis-role-item .role-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #334155; }

/* ---------- RTL thesis sidebar adjustment ---------- */
html[dir="rtl"] .thesis-meta-box .thesis-student-sidebar,
body.rtl .thesis-meta-box .thesis-student-sidebar,
.rtl .thesis-meta-box .thesis-student-sidebar {
  border-right: none;
  border-left: 1px solid #e2e8f0; }

/* ---------- Abstract section ---------- */
.thesis-abstract-card {
  padding: 2.5rem; }
  .thesis-abstract-card .thesis-abstract-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #f1f5f9;
    position: relative; }
    .thesis-abstract-card .thesis-abstract-title::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 40px;
      height: 2px;
      background-color: #1e3a8a; }
  .thesis-abstract-card .thesis-abstract-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #475569;
    text-align: justify;
    unicode-bidi: plaintext; }
    .thesis-abstract-card .thesis-abstract-body .thesis-summary-rtl {
      direction: rtl !important;
      text-align: right !important;
      unicode-bidi: embed; }

/* ---------- Back button ---------- */
.thesis-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); }
  .thesis-back-btn i {
    margin-right: 0.4rem;
    font-size: 0.95rem;
    transition: transform 0.2s ease; }
  .thesis-back-btn:hover {
    color: #1e3a8a;
    background-color: #f1f5f9;
    border-color: #c7d3e2;
    text-decoration: none; }
    .thesis-back-btn:hover i {
      transform: translateX(-3px); }

html[dir="rtl"] .thesis-back-btn i,
body.rtl .thesis-back-btn i,
.rtl .thesis-back-btn i {
  margin-right: 0;
  margin-left: 0.4rem; }

html[dir="rtl"] .thesis-back-btn:hover i,
body.rtl .thesis-back-btn:hover i,
.rtl .thesis-back-btn:hover i {
  transform: translateX(3px); }