/* @import url('ssp-ux.css'); */

/* ================= DESIGN SYSTEM ================= */
      :root {
      /*      --bg: #f6f8fb;*/
      --bg: #eaeafac9;
      --surface: #ffffff;
      --primary: #6366f1;
      --primary-light: #eef2ff;
      --text: #1e293b;
      --muted: #64748b;
      --border: #e2e8f0;
      --radius: 12px;
      /*      --shadow: 0 4px 12px rgba(0,0,0,0.05);*/
      --shadow-hover: 0 8px 20px rgba(0,0,0,0.08);
      --transition: all 0.25s ease;
      --gradient-primary1: linear-gradient(135deg, #6366f1, #4f46e5);
      --gradient-primary2: linear-gradient(135deg, #0ea5e9, #2563eb);
      --gradient-primary3: linear-gradient(135deg, #14b8a6, #0d9488);
      --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
      --shadow-md: 0 6px 18px rgba(0,0,0,0.06);
      --shadow-lg: 0 12px 28px rgba(0,0,0,0.08);
      --card-bg: #ffffff;
      }



      /* Inter Variable Font */


      /* Regular */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

/* Medium */
/*@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/medium.woff2') format('woff2');
  font-weight: 500;  /* ✅ correct */
  /* font-style: normal; */
/* }*/ */

/* Bold */
/*@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
} */


* {
  font-style: normal !important;
} 


      th,
      .table th {
        font-style: normal !important;
        font-weight: 500;  /* not 600 */ 
      } 



      /* ================= GLOBAL ================= */
      body {
      margin: 0;
      font-family: 'Inter', sans-serif; 
      background: var(--bg);
      color: var(--text);
      font-weight: 400;
      }
      .app {
      display: flex;
      min-height: 100vh;
      }
      /*      cards*/
      .card,
      /*.info-card,*/
      .scheme-header-card,
      .scheme-table-card {
      background: var(--card-bg);
      border-radius: 14px;
      border: none; /* remove heavy borders */
      box-shadow: var(--shadow-sm);
      transition: all 0.25s ease;
      }
      .card:focus-within {
      box-shadow: 0 0 0 2px rgba(99,102,241,0.15),
      var(--shadow-md);
      }
      .scheme-section {
      box-shadow: var(--shadow-md);
      }
      /* ================= SIDEBAR ================= */
      /* ===== SIDEBAR BASE ===== */
      .sidebar {
      width: 240px;
      height: 100vh;
      background: #ffffff;
      /*box-shadow: inset -1px 0 0 rgba(0,0,0,0.05);*/
      position: fixed;
      transition: all 0.3s ease;
      z-index: 1000;
      display: flex;
      flex-direction: column;
      /*      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);*/
      }


      .sidebar-menu li {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu li:hover {
  background: rgba(37, 99, 235, 0.08);
}


      .collapsed .shortName {
      display: none;
      }
      /*   .sidebar-menu li.active {
      position: relative;
      }
      .sidebar-menu li.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 8px;
      bottom: 8px;
      width: 3px;
      background: #2563eb;
      border-radius: 2px;
      }*/
      .sidebar .active {
      position: relative;
      }
      .sidebar .active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 10px;
      bottom: 10px;
      width: 3px;
      background: #2563eb;
      border-radius: 2px;
      }
      /* .sidebar-menu li.active::before {
      content: "";
      position: absolute;
      left: -10px;
      top: 50%;
      transform: translateY(-50%);
      width: 4px;
      height: 60%;
      background: #6366f1;
      border-radius: 4px;
      }*/
      /* ===== COLLAPSED ===== */
      .sidebar.collapsed {
      width: 70px;
      }
      /* ===== HEADER ===== */
      .sidebar-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 18px 16px;
      font-weight: 600;
      font-size: 16px;
      justify-content: center;
      }
      .logo-icon {
      font-size: 18px;
      }
      .logo-text {
      transition: all 0.2s ease;
      }
      /* Hide logo text */
      .sidebar.collapsed .logo-text {
      opacity: 0;
      width: 0;
      overflow: hidden;
      }
      /* Center logo when collapsed */
      .sidebar.collapsed .sidebar-header {
      justify-content: center;
      }
      /* ===== MENU ===== */
      .sidebar-menu {
      list-style: none;
      padding: 10px 0;
      margin: 0;
      }
      /* MENU ITEM */
      .sidebar-menu li {
      display: flex;
      align-items: center;
      gap: 14px;
      margin: 6px 10px;
      padding: 12px 14px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.25s ease;
      position: relative;
      font-size: 13px; 
      }
      /* ICON */
      .sidebar-menu li i {
      font-size: 18px;
      min-width: 24px;
      text-align: center;
      }
      /* TEXT */
      .menu-text {
      white-space: nowrap;
      transition: all 0.2s ease;
      }
      /* HOVER */
      .sidebar-menu li:hover {
      background: #eef2ff;
      }
      /* ACTIVE */
      /*.sidebar-menu li.active {
      background: var(--gradient-primary2);
      color: #fff;
      }*/
      /*.sidebar-menu li.active {
      background: linear-gradient(135deg, #6366f1, #4f46e5);
      color: #fff;
      }*/
      .sidebar-menu li.active {
      color: #1e51da;
      background: linear-gradient(135deg, #eff6ff, #dbeafe);
      font-weight: 600;
      }
      /*.sidebar-menu li.active {
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
      color: #fff;
      }*/
      /* ===== COLLAPSE BEHAVIOR ===== */
      /* Center items */
      .sidebar.collapsed .sidebar-menu li {
      justify-content: center;
      padding-right: 0;
      } 
      /* Hide text cleanly */
      .sidebar.collapsed .menu-text {
      opacity: 0;
      width: 0;
      overflow: hidden;
      }
      /* ===== TOOLTIP (PRO UX) ===== */
      .sidebar.collapsed .sidebar-menu li:hover::after {
      content: attr(data-title);
      position: absolute;
      left: 80px;
      background: #111;
      color: #fff;
      padding: 6px 10px;
      font-size: 12px;
      border-radius: 6px;
      white-space: nowrap;
      }
      /* ===== SMOOTH ICON EFFECT ===== */
      .sidebar.collapsed .sidebar-menu li i {
      transform: scale(1.1);
      }

      /* ===== SIDEBAR SUBMENU (institute) ===== */
      .has-submenu {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 0 !important;
      }
      .submenu-toggle {
      min-height: 42px;
      padding: 0 12px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: all 0.22s ease;
      width: 100%;
      }
      .submenu-left {
      display: flex;
      align-items: center;
      gap: 10px;
      }
      .submenu-left i {
      font-size: 16px;
      color: #334155;
      }
      .submenu-arrow {
      font-size: 11px;
      color: #5b6df6;
      transition: transform 0.28s ease;
      }
      .has-submenu.open .submenu-arrow {
      transform: rotate(180deg);
      }
      .submenu-list {
      list-style: none;
      padding: 0;
      margin: 0;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
      }
      .has-submenu.open .submenu-list {
      max-height: 200px;
      opacity: 1;
      padding: 5px;
      background: linear-gradient(135deg, #f3f5ff 0%, #eef2ff 100%);
      border-radius: 12px;
      width: 100%;
      }
      .sidebar.collapsed .submenu-arrow {
      display: none;
      }
      .sidebar.collapsed .has-submenu .submenu-list {
      max-height: 0 !important;
      opacity: 0 !important;
      padding: 0 !important;
      }
      .submenu-list li {
      height: 34px;
      padding: 0 10px;
      margin: 2px 0;
      border-radius: 10px;
      display: flex;
      align-items: center;
      gap: 9px;
      cursor: pointer;
      transition: all 0.2s ease;
      }
      .submenu-list li:hover {
      background: rgba(255, 255, 255, 0.9);
      transform: translateX(2px);
      }
      .submenu-list li i {
      font-size: 13px;
      color: #5b6df6;
      }
      .submenu-list li .menu-text {
      font-size: 12px;
      font-weight: 600;
      color: #475569;
      }
      .sidebar.collapsed ul.sidebar-menu {
      overflow-x: hidden;
      }

      @media (max-width: 768px) {

            .table-toolbar {
                  flex-direction: column;
    justify-content: flex-start !important;
            align-items: flex-start !important; 
}
.toolbar-actions {
      flex-direction: column;
      align-items: flex-start !important;
}

      .sidebar {
      position: fixed;
      left: -240px;
      }
      .sidebar.show {
      left: 0;
      }
      }
      /* ================= MAIN ================= */
      .main {
             min-width: 0; /* 🔥 THIS IS THE KEY FIX */
      margin-left: 240px;
      display: flex;
      flex-direction: column;
      flex: 1;
      transition: var(--transition);
      }
      .main.expanded {
      margin-left: 70px;
      }
      .footer {
  margin-top: auto;
}
      /* ================= HEADER ================= */
            .header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* user block */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* avatar */
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
}

/* text */
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-label {
  font-size: 11px;
  color: #7b8794;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

/* time */
.header-time {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #64748b;
  font-size: 14px;
}

/* logout */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;

  cursor: pointer;
  color: #1e293b;

  transition: 0.2s ease;
}

.logout-btn:hover {
  color: #2563eb;
}

/* divider */
.divider {
  width: 1px;
  height: 24px;
  background: #dbe2ea;
}

      /* ===== HEADER BASE (GLASS EFFECT) ===== */

       ssp-header-nav {
        position: sticky;
        top: 0;
        z-index: 999;
      } 


      .header {
      height: 64px;
      background: rgba(255,255,255,0.75);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid #f1f5f9;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 24px;
      position: sticky;
      top: 0;
      z-index: 999;
      }
      /* ===== LEFT ===== */
      .header-left {
      display: flex;
      align-items: center;
      gap: 14px;
      }
      .toggle-wrapper {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      transition: all 0.2s ease;
      cursor: pointer; 
      } 
      .toggle-wrapper:hover {
      background: #f1f5f9;
      }
      .toggle-btn {
      font-size: 20px;
      }
      /* TITLE */
      .title-group {
      display: flex;
      flex-direction: column;
      }
      .highlight {
      /*      color: #6366f1;*/
      color: #1d50d9;
      font-weight: 600;
      }
      .title {
      font-weight: 600;
      font-size: 14px;
      letter-spacing: -0.2px; 
      }
      .subtitle {
      font-size: 11px;
      color: #64748b;
      }
      /* ===== RIGHT ===== */
      .header-right {
      display: flex;
      align-items: center;
      gap: 14px;
      }
      /* COMMON ITEM */
      .header-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      padding: 6px 10px;
      border-radius: 8px;
      transition: all 0.2s ease;
      cursor: pointer;
      }
      .header-item:hover {
      background: #f8fafc;
      }
      /* ===== DIVIDER ===== */
      .divider {
      width: 1px;
      height: 18px;
      background: #e2e8f0;
      }
      /* ===== FONT BUTTONS ===== */
      .btn-font {
      border: 1px solid #e2e8f0;
      background: #fff;
      padding: 4px 8px;
      border-radius: 6px;
      font-size: 12px;
      transition: all 0.2s ease;
      }
      .btn-font:hover {
      background: #eef2ff;
      }
      .btn-font.active {
      /*      background: #6366f1;*/
      background: #1d50d9;
      color: #fff;
      border-color: #6366f1;
      }
      /* ===== LANGUAGE ===== */
      .lang-switch:hover {
      color: #6366f1;
      }
      /* ===== TIME ===== */
      .header-time {
      color: #64748b;
      font-weight: 500;
      opacity: 0.8;
      }
      /* ===== USER ===== */
      .user {
      position: relative;
      font-weight: 500;
      }
      /* AVATAR */
      .avatar {
      width: 38px;
      height: 38px;
      /*      background: #6366f1;*/
      background: #1d50d9;
      color: white;
      font-size: 12px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      }
      /* DROPDOWN */
      .dropdown-menu-custom {
      position: absolute;
      top: 42px;
      right: 0;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.08);
      display: none;
      padding: 8px;
      min-width: 140px;
      }
      .dropdown-item {
      padding: 8px 10px;
      border-radius: 6px;
      font-size: 13px;
      }
      .dropdown-item:hover {
      background: #f1f5f9;
      }
      /* ===== RESPONSIVE ===== */
      @media (max-width: 768px) {
      .subtitle,
      .font-controls,
      .header-time,
      .divider {
      display: none;
      }
      }
      img.logo_header {
      width: 34px;
      }
      /* Default (Desktop) */
      .title-short {
      display: none;
      }
      .title-full {
      display: inline;
      font-weight: 600;
      }
      /* Mobile */
      @media (max-width: 768px) {
      .title-full {
      display: none;
      }
      .title-short {
      display: inline;
      font-weight: 600;
      font-size: 15px;
      }
      }
      /* Mobile optimization */
      @media (max-width: 768px) {
      .font-controls,
      .header-time {
      display: none;
      }
      .header-right {
      gap: 8px;
      }
      .header-item {
      padding: 4px 6px;
      }
      .user span {
      display: none; /* show only avatar */
      }
      }
      /* ================= USER ================= */
      .user {
      position: relative;
      cursor: pointer;
      text-align: center;
      display: flex;
      justify-content: center;
      }
      .dropdown-menu-custom {
      position: absolute;
      top: 40px;
      right: 0;
      background: white;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: none;
      padding: 10px;
      }
      /* ================= CONTENT ================= */
      .content {
      padding: 20px;
      flex: 1;
      }
      /* KPI */
      .kpi-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 15px;
      }
      .kpi-card {
      background: var(--surface);
      padding: 16px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      transition: var(--transition);
      }
      .kpi-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-hover);
      }
      .kpi-card span {
      display: block;
      font-size: 22px;
      font-weight: 600;
      }
      /* TABLE */
      .table-card {
      background: var(--surface);
      margin-top: 20px;
      padding: 16px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      }
      .badge-status {
      padding: 6px 10px;
      border-radius: 20px;
      font-size: 12px;
      }
      .success {
      background: #dcfce7;
      color: #166534;
      }
      /* ================= FOOTER ================= */
      /* ===== FOOTER BASE ===== */
      .app-footer {
      background: rgba(255,255,255,0.7);
      backdrop-filter: blur(8px);
      border-top: 1px solid #e2e8f0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 20px;
      font-size: 12.5px;
      color: #64748b;     
      /* Sticky behavior */
      margin-top: auto;
      }
      /* LEFT */
      .footer-left {
      font-weight: 500;
      }
      /* RIGHT */
      .footer-right {
      display: flex;
      gap: 16px;
      }
      /* LINKS */
      .footer-link {
      cursor: pointer;
      transition: all 0.2s ease;
      }
      .footer-link:hover {
      color: #6366f1;
      }
      /* RESPONSIVE */
      @media (max-width: 768px) {
      .app-footer {
      flex-direction: column;
      gap: 6px;
      text-align: center;
      }
      .footer-right {
      gap: 10px;
      }
      }
      /* ================= RESPONSIVE ================= */
      @media (max-width: 768px) {
      .sidebar {
      position: absolute;
      left: -240px;
      }
      .sidebar.show {
      left: 0;
      }
      .main {
      margin-left: 0 !important;
      }
      .kpi-row {
      grid-template-columns: repeat(2, 1fr);
      }
      }



      