/* ---------- FULL MATERIAL BOX ---------- */

div.fullm {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  max-width: 280px;
  min-width: 140px;
  margin: 1rem 0 1rem 1rem;
  padding: 0.75rem 1rem;
  background-color: #2c54ab;
  color: #f9fafb;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

div.fullm button {
  margin-top: 0.6rem;
  width: 100%;
  padding: 0.5rem;
  background: #1E3A8A;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

div.fullm button:hover {
  background:#162F6D;
}

/* ---------- GRID LAYOUT ---------- */

.table-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
}

/* ---------- CARD ROW ---------- */

.table-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(16,24,40,0.06);
  border: 1px solid rgba(15,23,42,0.04);
  transition: 0.2s;
}

.table-row:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(16,24,40,0.12);
}

/* ---------- CHAPTER NUMBER ---------- */

.cell-no {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;

  border-radius: 50%;
  background: linear-gradient(180deg,#1E3A8A,#16306f);
  color: white;
  font-weight: 800;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- CHAPTER NAME ---------- */

.cell-name {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: black;
  line-height: 1.25;
}

/* ---------- VIEW BUTTON ---------- */

.cell-view {
  flex: 0 0 auto;
}

/* Anchor button */

.cell-view a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: #1E3A8A;
  border: 1px solid rgba(30,58,138,0.15);
  background: transparent;
  transition: 0.2s;
}

.cell-view a:hover {
  background:#1E3A8A;
  color:white;
}

/* ---------- SELECT BUTTON (MATCH VIEW) ---------- */

.cell-view select {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  color: #1E3A8A;
  border: 1px solid rgba(30,58,138,0.15);
  background: transparent;
  cursor: pointer;
  appearance: none;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-view select:hover {
  background:#1E3A8A;
  color:white;
}

/* ---------- MOBILE ---------- */

@media (max-width:1024px){
  .table-grid{
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:680px){

  .table-grid{
    grid-template-columns:1fr;
  }

  .table-row{
    flex-direction: column;
    align-items:flex-start;
    gap:0.6rem;
  }

  .cell-view{
    width:100%;
  }

}

/* Extra small phone */

@media (max-width:420px){

  .cell-no{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    font-size:0.9rem;
  }

}