:root{
  /* Основни цветове (по задание) */
  --bg:#09E6C5;        /* фон */
  --text:#1F6FCC;      /* текст */

  /* Допълнителни */
  --panel:#ffffff;
  --panel2: rgba(255,255,255,.85);

  --muted:#2f7fd3;

  --border: rgba(31,111,204,.22);
  --shadow: 0 12px 28px rgba(31,111,204,.14);

  /* Hover/акценти (подбрани) */
  --hover:#06c4ab;     /* по-тъмен от фона */
  --hover2:#059f8b;    /* active */
  --focus: rgba(31,111,204,.35);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* линкове */
a{ color:inherit; text-decoration:none; }

/* header */
.topbar{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand__title{ font-weight:900; letter-spacing:.2px; }
.brand__subtitle{ color: var(--muted); font-size: 14px; margin-top:6px; }

/* Search */
.search{
  display:flex;
  gap:10px;
  align-items:center;
}
.search input{
  width:min(420px, 60vw);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.85);
  color: var(--text);
  outline:none;
  box-shadow: 0 10px 18px rgba(31,111,204,.10);
}
.search input:focus{
  border-color: rgba(31,111,204,.45);
  box-shadow: 0 12px 24px rgba(31,111,204,.18);
}

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:16px;
  padding:16px;
}
@media (max-width: 900px){
  .layout{ grid-template-columns: 1fr; }
}

/* Sidebar */
.sidebar{
  background: var(--panel2);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar__title{
  font-weight:900;
  margin-bottom:10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}

.student-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.student-item{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 18px rgba(31,111,204,.10);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.student-item:hover{
  transform: translateY(-2px);
  background: var(--hover);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(6,196,171,.28);
}
.student-item:active{
  background: var(--hover2);
  transform: translateY(-1px);
}
.student-item:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Content cards */
.content, .page{
  padding: 0 2px 24px;
}

.card{
  background: rgba(255,255,255,.82);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

/* Buttons */
.btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.88);
  color: var(--text);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  box-shadow: 0 10px 18px rgba(31,111,204,.10);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn--ghost{
  background: transparent;
  box-shadow: none;
}
.btn:hover{
  transform: translateY(-1px);
  background: var(--hover);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(6,196,171,.26);
}
.btn:active{
  transform: translateY(0px) scale(.99);
  background: var(--hover2);
}
.btn:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* 🎯 Специален бутон "Обратно към списъка" */
.btn--back{
  background: linear-gradient(135deg, #ffffff, rgba(255,255,255,.75));
  border: 1px solid rgba(31,111,204,.20);
  color: var(--text);
}
.btn--back:hover{
  background: linear-gradient(135deg, var(--hover), #03e0c0);
  color:#ffffff;
}
.btn--back:active{
  background: linear-gradient(135deg, var(--hover2), #03c8ac);
}

/* Grid thumbnails */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:12px;
  padding:16px;
}

.thumb{
  text-align:left;
  padding:10px;
  border-radius:18px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.84);
  cursor:pointer;
  box-shadow: 0 12px 22px rgba(31,111,204,.10);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.thumb:hover{
  transform: translateY(-3px);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 32px rgba(31,111,204,.14);
}
.thumb:active{ transform: translateY(-1px) scale(.995); }

.thumb img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:14px;
  display:block;
  background: rgba(31,111,204,.06);
}
.thumb__caption{
  margin-top:10px;
  font-size:13px;
  color: var(--muted);
  word-break: break-all;
  font-weight: 900;
}

.no-scroll{ overflow:hidden; }

/* Modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index: 20;
}
.modal.is-open{ display:block; }

.modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(31,111,204,.22);
  backdrop-filter: blur(2px);
}

.modal__panel{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width: min(980px, 92vw);
  max-height: 88vh;
  display:flex;
  flex-direction:column;
  background: rgba(255,255,255,.95);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 18px 50px rgba(31,111,204,.18);
}

.modal__header, .modal__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  background: rgba(255,255,255,.90);
}

.modal__footer{
  border-bottom:none;
  border-top:1px solid var(--border);
  justify-content:flex-end;
  gap:10px;
}

.modal__title{
  font-weight:900;
  max-width: 75%;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__body{
  padding:12px;
  overflow:auto;
  background: rgba(255,255,255,.85);
}

.modal__body img{
  width:100%;
  height:auto;
  border-radius:14px;
  display:block;
  background: rgba(31,111,204,.06);
}
/* Центриране и уголемяване на заглавието */
.topbar{
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand{
  text-align:center;
}

.brand__title{
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand__subtitle{
  margin-top:6px;
}
