* {
    box-sizing: border-box;
}

.sidebar::-webkit-scrollbar,
.editor-main::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.editor-main::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.editor-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.editor-main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #111;
    color: #fff;
}

body {
    overflow: auto;
}

body.config_page,
body.control_page {
    overflow: hidden;
}

.page-shell {
    width: 100%;
}

.page-shell--public,
.page-shell--editor {
    height: calc(100vh - 58px);
    min-height: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 18px;
    height: 18px;

    border-radius: 6px;
    border: 2px solid #3a3a3a;
    background: #181818;

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

    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="checkbox"]:hover {
    border-color: #6a6a6a;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

input[type="checkbox"]::after {
    content: "";
    width: 6px;
    height: 10px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.12s ease;
}

input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:checked {
    background: #4ade80;
    border-color: #4ade80;
}

input[type="checkbox"]::after {
    border-color: #111;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #181818;
    border-bottom: 1px solid #2c2c2c;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
}

.site-header__brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 2em;
}

.site-header__nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.site-header__nav a {
    color: #bbb;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.site-header__nav a:hover {
    background: #2a2a2a;
    color: #fff;
}

.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

.flash-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid transparent;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.flash-success {
    background: #1d3a24;
    border-color: #2b5c36;
    color: #d7ffe0;
}

.flash-error {
    background: #3a1d1d;
    border-color: #7a2f2f;
    color: #ffd6d6;
}

.flash-warning {
    background: #3a341d;
    border-color: #7a6a2f;
    color: #fff3c4;
}

.flash-info {
    background: #1d2a3a;
    border-color: #2f4f7a;
    color: #d6e7ff;
}

.flash-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
}

.form-error {
    background: #4a1f1f;
    border: 1px solid #7a2f2f;
    color: #ffd6d6;
    border-radius: 10px;
    padding: 10px 12px;
}

.landing {
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.landing--wide {
    align-items: flex-start;
}

.landing-card {
    width: 100%;
    max-width: 420px;
    background: #181818;
    border: 1px solid #2c2c2c;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.landing-card--wide {
    max-width: 980px;
}

.landing-card h1,
.landing-card h2 {
    margin: 0;
}

.landing-card p {
    margin: 0;
    color: #bbb;
}

.landing-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-card input,
.landing-card select,
.landing-card textarea {
    width: 100%;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 10px 12px;
}

.landing-card input[type="color"] {
    min-height: 46px;
    padding: 4px;
}

.landing-card input[type="range"] {
    padding: 0;
}

.landing-card button,
.board-list-actions a,
.admin-user-actions button {
    background: #fff;
    color: #111;
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.board-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #202020;
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 12px 14px;
}

.board-list-item--stack {
    align-items: flex-start;
}

.board-list-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.board-list-actions form {
    display: inline;
    margin: 0;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #a92b2b !important;
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.danger-button:hover {
    background: #c53838 !important;
}

.admin-user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.admin-user-actions form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-user-actions select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 10px;
}

.visibility-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}

.visibility-badge--public {
    background: #1d3a24;
    color: #d7ffe0;
    border: 1px solid #2b5c36;
}

.visibility-badge--internal {
    background: #3a341d;
    color: #fff3c4;
    border: 1px solid #7a6a2f;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.feature-item {
    background: #202020;
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 14px;
}

.feature-item strong {
    display: block;
    margin-bottom: 6px;
}

.feature-item p {
    margin: 0;
    color: #bbb;
}

.landing-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.primary-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #111;
    border-radius: 10px;
    padding: 12px 14px;
    text-decoration: none;
    font-weight: 700;
}

.boards-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.boards-header-actions {
    display: flex;
    gap: 10px;
}

.site-header__menu {
  position: relative;
  display: flex;
  align-items: center;
}

.site-header__burger {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #1b1b1b;
  cursor: pointer;
  padding: 0;
}

.site-header__burger span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.site-header__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header__nav--dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #181818;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 200;
}

.site-header__nav--dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.site-header__nav--dropdown a {
  display: block;
  padding: 10px 12px;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  background: transparent;
}

.site-header__nav--dropdown a:hover {
  background: #242424;
}