:root{
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #0b1b2b;
  --muted: #6b7a8b;

  --primary: #0b2f4f;      /* deep CIPEJ blue */
  --primary-2: #11456f;    /* hover */
  --border: #e6edf5;

  --radius: 14px;
  --shadow: 0 14px 40px rgba(11, 47, 79, .10);
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
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; }
.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header{
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 0;
  gap: 16px;
}
.brand{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.brand-mark{
  letter-spacing: .14em;
  font-weight: 800;
  color: var(--primary);
  font-size: 20px;
}
.brand-sub{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  max-width: 520px;
}
.header-actions{ display:flex; gap: 10px; }

/* Footer */
.site-footer{
  margin-top: 40px;
  background:#fff;
  border-top: 1px solid var(--border);
}
.footer-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding: 18px 0;
  gap: 16px;
}
.footer-muted{ color: var(--muted); font-size: 13px; }
.footer-right{ display:flex; gap: 14px; flex-wrap: wrap; }

/* Auth layout */
.auth-wrap{
  padding: 34px 0 10px;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start;
}
.auth-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.auth-head{ margin-bottom: 16px; }
.auth-title{
  margin:0 0 8px;
  font-size: 34px;
  line-height: 1.05;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.auth-subtitle{
  margin:0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.auth-side .side-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.side-card h2{
  margin:0 0 10px;
  color: var(--primary);
  font-size: 18px;
}
.side-card p{
  margin:0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}
.ticks{
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}
.ticks li{ margin: 8px 0; }

/* Form */
.form{ margin-top: 14px; }
.field{ margin-bottom: 14px; }
.label{
  display:block;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--text);
}
.input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  font-size: 15px;
}
.input:focus{
  border-color: rgba(17, 69, 111, .55);
  box-shadow: 0 0 0 4px rgba(17, 69, 111, .12);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  border: 1px solid transparent;
  cursor: pointer;
  user-select:none;
  transition: .15s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover{ background: var(--primary-2); }
.btn-outline{
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover{
  background: rgba(11, 47, 79, .06);
}
.btn-block{ width:100%; }

.link{
  color: var(--primary);
  font-weight: 650;
}
.link:hover{ text-decoration: underline; }
.muted{ color: var(--muted); }

/* Alerts */
.alert{
  padding: 12px 12px;
  border-radius: 12px;
  margin: 14px 0 10px;
  border: 1px solid;
  font-size: 14px;
}
.alert-danger{
  background: #ffecec;
  border-color: #ffd0d0;
  color: #7a1e1e;
}

/* Auth footer line */
.auth-foot{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  font-size: 14px;
}

/* Mobile */
@media (max-width: 860px){
  .auth-wrap{ grid-template-columns: 1fr; }
  .brand-sub{ max-width: none; }
}
@media (max-width: 480px){
  .auth-title{ font-size: 28px; }
  .header-row{ padding: 14px 0; }
}

/* Make nav links look like pills, not “giant buttons” */
.admin-nav a.btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 999px;
  line-height: 1;
  font-weight: 650;
  border: 1px solid #dbe6f2;
  color: #0b2f4f;
  background: #f7fbff;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}

.admin-nav a.btn:hover {
  background: #eef6ff;
  border-color: #cfe0f3;
  transform: translateY(-1px);
}
.topnav{display:flex;align-items:center;gap:10px;margin-left:auto;margin-right:14px}
.nav-toggle{display:none;background:transparent;border:1px solid #e6edf5;color:#0b2239;padding:7px 10px;border-radius:10px;font-weight:600}
.nav-items{display:flex;align-items:center;gap:8px}

/* dropdown */
.dd{position:relative}
.dd-btn{
  background:transparent;
  border:1px solid #e6edf5;
  color:#0b2239;
  padding:7px 10px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  line-height:1;
}
.dd-menu{
  display:none;
  position:absolute;
  top:42px;
  left:0;
  min-width:210px;
  background:#fff;
  border:1px solid #e6edf5;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  z-index:40;
}
.dd-menu a{
  display:block;
  padding:10px 12px;
  text-decoration:none;
  color:#0b2239;
  font-weight:600;
}
.dd-menu a:hover{background:#f4f7fb}

@media (max-width: 980px){

  .nav-items{
    display:none;
  }

  .nav-open .nav-items{
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .dd-btn{ display:none; }

  .dd-menu{
    display:block;
    position:static;
    box-shadow:none;
    border:1px solid #e6edf5;
    border-radius:12px;
  }

  .dd{ width:100%; }
}


.dd.open .dd-menu{
  display:block;
}
.nav-toggle{
  width:42px;
  height:42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  border:1px solid #e6edf5;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  padding:0 10px;
}

.nav-toggle span{
  display:block;
  height:3px;
  width:100%;
  background:#0b2239;
  border-radius:3px;
  transition:.3s;
}

/* Анимация в крестик */
.nav-open .nav-toggle span:nth-child(1){
  transform:translateY(9px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2){
  opacity:0;
}

.nav-open .nav-toggle span:nth-child(3){
  transform:translateY(-9px) rotate(-45deg);
}
/* по умолчанию (ПК) — скрыта */
.nav-toggle{
  display:none;
}

/* на телефоне — видна */
@media (max-width: 980px){
  .nav-toggle{
    display:flex;
  }
}

@media (max-width: 720px){

  /* прячем заголовок таблицы */
  .staff-table thead{
    display:none;
  }

  .staff-table,
  .staff-table tbody,
  .staff-table tr,
  .staff-table td{
    display:block;
    width:100%;
  }

  /* строка = карточка */
  .staff-table tr{
    background:#fff;
    border:1px solid #e6edf5;
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:12px;
  }

  .staff-table td{
    border:none !important;
    padding:8px 0 !important;
  }

  /* label слева, значение справа */
  .staff-table td::before{
    content: attr(data-label);
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:3px;
    font-weight:600;
  }

  /* действия: кнопки в строку */
  .staff-table td[data-label="Acțiuni"]{
    padding-top:10px !important;
  }
  .staff-table td[data-label="Acțiuni"] .btn{
    width:100%;
    justify-content:center;
    margin-top:8px;
  }
}
@media (max-width: 720px){

  /* контейнер действий = колонка */
  .staff-table td[data-label="Acțiuni"]{
    display:flex;
    flex-direction:column;
    gap:8px;
  }

  /* кнопки на всю ширину */
  .staff-table td[data-label="Acțiuni"] .btn{
    width:100%;
    justify-content:center;
    margin:0 !important;
  }

}
@media (max-width: 720px){
  .courses-table thead{ display:none; }
  .courses-table, .courses-table tbody, .courses-table tr, .courses-table td{
    display:block; width:100%;
  }
  .courses-table tr{
    background:#fff;
    border:1px solid #e6edf5;
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:12px;
  }
  .courses-table td{
    border:none !important;
    padding:8px 0 !important;
  }
  .courses-table td::before{
    content: attr(data-label);
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:3px;
    font-weight:600;
  }
  .courses-table td[data-label="Acțiuni"]{
    display:flex; flex-direction:column; gap:8px;
  }
  .courses-table td[data-label="Acțiuni"] .btn{
    width:100%; justify-content:center; margin:0 !important;
  }
}
@media (max-width: 720px){
  .att-table thead{ display:none; }
  .att-table, .att-table tbody, .att-table tr, .att-table td{
    display:block; width:100%;
  }
  .att-table tr{
    background:#fff;
    border:1px solid #e6edf5;
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:12px;
  }
  .att-table td{
    border:none !important;
    padding:8px 0 !important;
  }
  .att-table td::before{
    content: attr(data-label);
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:3px;
    font-weight:600;
  }
  .att-actions .btn{
    width:100%;
    justify-content:center;
    margin:0 !important;
  }
}
@media (max-width: 720px){
  .students-table thead{ display:none; }
  .students-table, .students-table tbody, .students-table tr, .students-table td{
    display:block; width:100%;
  }
  .students-table tr{
    background:#fff;
    border:1px solid #e6edf5;
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:12px;
  }
  .students-table td{
    border:none !important;
    padding:8px 0 !important;
  }
  .students-table td::before{
    content: attr(data-label);
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:3px;
    font-weight:600;
  }
  .students-table td[data-label="Acțiuni"]{
    display:flex; flex-direction:column; gap:8px;
  }
  .students-table td[data-label="Acțiuni"] .btn{
    width:100%;
    justify-content:center;
    margin:0 !important;
  }
}
@media (max-width: 720px){
  .att-table thead{ display:none; }
  .att-table, .att-table tbody, .att-table tr, .att-table td{ display:block; width:100%; }
  .att-table tr{
    background:#fff;border:1px solid #e6edf5;border-radius:14px;
    padding:10px 12px;margin-bottom:12px;
  }
  .att-table td{ border:none !important; padding:8px 0 !important; }
  .att-table td::before{
    content: attr(data-label);
    display:block;font-size:12px;opacity:.65;margin-bottom:3px;font-weight:600;
  }
}
