/********************************************************
 ████████████████████████████████████████████████████████
   I. GLOBAL (ОБЩИЕ СТИЛИ — РАБОТАЮТ ВЕЗДЕ)
████████████████████████████████████████████████████████
*********************************************************/

:root {
  --container-max: 1000px;   /* ширина страницы */
  --topbar-h: 50px;          /* единая высота топбара */
  --sidebar-w: 75vw;         /* ширина меню для всех устройств */
  --sidebar-max: 340px;      /* максимальная ширина меню */
}

/* RESET */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: sans-serif;
  background: #fff;
}

/* PAGE LAYOUT */
#page {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main {
  flex: 1;
  overflow: hidden;        /* все что внутри будет внутри */
  padding: 0px 0px 0px 0px;
  text-align: center;
  background: #f5f5f5;
}


#footer {
  padding: 0px 0px 0px 0px;
  overflow: hidden;
  background: #f3e9dd;
  text-align: center;
  font-size: 14px;
  color: #444; 
}




/********************************************************
   CARD COMPONENT — универсальная белая карточка
*********************************************************/

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 10px 20px 10px;
  margin: 10px 10px 10px 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;    /* можно заменить на center если хочешь */
}

/* Заголовок карточки */
.card h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
}

/* Обычный текст внутри карточки */
.card p {
  margin: 0 0 14px 0;
  font-size: 15px;
  line-height: 1.45;
}





/********************************************************
   BUTTONS KIT — SMART VISION 2025
*********************************************************/

/* ===========================
   COLORS (если нужны переменные)
=========================== */

:root {
  --sv-purple: #766bff;
  --sv-purple-10: rgba(118,107,255,0.10);
  --sv-purple-22: rgba(118,107,255,0.22);
  --sv-text-strong: #111;
}



/* ===========================
   PRIMARY BUTTON — ФИОЛЕТОВАЯ
   (Запуск записи / Стоп / Повтор)
=========================== */

.btn-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 12px 14px;
  border-radius: 10px;

  background: #fff;
  border: 1px solid var(--sv-purple);
  color: var(--sv-text-strong);
  font-weight: 700;

  cursor: pointer;

  transition:
    background .2s,
    box-shadow .2s,
    border-color .2s,
    transform .06s;
}

.btn-purple:hover {
  background: var(--sv-purple-10);
}

.btn-purple:active,
.btn-purple[aria-pressed="true"],
.btn-purple.is-active {
  background: var(--sv-purple-22);
  border-color: var(--sv-purple);
  box-shadow: 0 0 0 2px rgba(120,100,255,.18);
}

.btn-purple:focus-visible {
  outline: none;
  background: var(--sv-purple-10);
  border-color: var(--sv-purple);
  box-shadow: 0 0 0 3px rgba(120,100,255,.25);
}

.btn-purple:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}



/* ===========================
   SECONDARY BUTTON — БЕЛАЯ
   (Удалить / Сохранить / Отмена)
=========================== */

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 14px;
  border-radius: 10px;

  background: #fff;
  border: 1px solid #ccc;
  color: #111;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .2s,
    border-color .2s,
    box-shadow .2s,
    transform .06s;
}

.btn-white:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.btn-white:active {
  background: #e9e9e9;
  border-color: #aaa;
  box-shadow: 0 0 0 2px rgba(0,0,0,.05);
}

.btn-white:focus-visible {
  outline: none;
  background: #f5f5f5;
  border-color: #bbb;
  box-shadow: 0 0 0 3px rgba(0,0,0,.15);
}

.btn-white:disabled {
  opacity: .55;
  cursor: not-allowed;
}



/* ===========================
   GROUPS — РЯДЫ И КОЛОНКИ
=========================== */

/* Ряд кнопок */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Колонка */
.stack-16 > * + * {
  margin-top: 16px;
}

/********************************************************































 ████████████████████████████████████████████████████████
   II. MOBILE VERSION (МОБИЛЬНАЯ ВЁРСТКА — ПО УМОЛЧАНИЮ)
████████████████████████████████████████████████████████
*********************************************************/

/* ─────────────── TOPBAR (mobile-first) ─────────────── */

#topbar {
  height: var(--topbar-h);
  background: #ffffff;            /* мобилка — белый */
  border-bottom: 1px solid #ddd;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 14px;
  position: static;
  z-index: 5000;
}

/* grid:  ▣ (menu) | LOGO | [Exit] */
.topbar-inner {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 40px 1fr 90px;
  align-items: center;
}

/* BURGER */
.menu-toggle {
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}

/* LOGO (mobile) */
.logo {
  justify-self: center;
}
.logo img {
  width: 200px;        /* ← мобильная версия: большой лого */
  height: auto;
  object-fit: contain;
}

/* EXIT BUTTON */
.login-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;

  font-size: 14px;
  text-decoration: none;
  color: #111;
  white-space: nowrap;
}


/* ─────────────── SIDEBAR (mobile-first) ─────────────── */

#sidebar {
  position: fixed;
  top: 0;
  left: 0;

  width: var(--sidebar-w);
  max-width: var(--sidebar-max);
  height: 100vh;

  background: #fff;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  z-index: 9999;

  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;

  transition: transform .25s ease-out, opacity .2s ease-out;
}

body.menu-open #sidebar {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.40);
  display: none;
  z-index: 9998;
}
body.menu-open #overlay {
  display: block;
}


/* ─────────────── MENU ELEMENTS ─────────────── */

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li {
  border-bottom: 1px solid #eee;
}
.menu a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #111;
  font-size: 16px;
}
.menu a:hover {
  background: rgba(0,0,0,0.05);
}
.menu a.is-active {
  font-weight: 700;
  background: rgba(0,0,0,0.08);
}
































/********************************************************
 ████████████████████████████████████████████████████████
   III. DESKTOP VERSION (>= 801px)
████████████████████████████████████████████████████████
*********************************************************/

@media (min-width: 801px) {

  /* ─────────────── TOPBAR (desktop) ─────────────── */

  #topbar {
    height: var(--topbar-h);
    background: #f2f2f2;     /* ПК — серый */
    padding: 0 20px;
    border-bottom: 1px solid #ddd;
    position: static;
  }

  .topbar-inner {
    grid-template-columns: 50px 1fr 110px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  /* LOGO (desktop) */
  .logo img {
    width: auto;
    height: 32px;      /* ← ПК: компактный логотип */
  }

  .login-link {
    padding: 7px 14px;
    font-size: 15px;
  }


  /* ─────────────── SIDEBAR (desktop) ─────────────── */

  #sidebar {
    width: 300px;
    max-width: 300px;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
  }

  body.menu-open #sidebar {
    transform: translateX(0);
    opacity: 1;
  }


  /* ─────────────── MENU ON DESKTOP ─────────────── */

  .menu a {
    font-size: 17px;
    padding: 16px 20px;
  }

}
