:root {
    --bg: #0d100c;
    --surface: #141a12;
    --surface2: #1c2418;
    --border: #2a3d28;
    --text: #e8efe4;
    --text-muted: #8fa38a;
    --accent: #c5e063;
    --accent-dim: #7a8f3a;
    --hazard: #d4a017;
    --danger: #c44c3a;
    --success: #5cb87a;
    --grid-line: rgba(197, 224, 99, 0.06);
    --radius: 6px;
    --font-display: "Rajdhani", "Segoe UI", sans-serif;
    --font-mono: "Share Tech Mono", ui-monospace, monospace;
    --btn-max-width: 18rem;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    font-family: var(--font-display);
    background:
        linear-gradient(180deg, rgba(197, 224, 99, 0.03) 0%, transparent 32%),
        repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 48px),
        var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
    font-size: 1.05rem;
}

/* Страница /chat: колонка на весь экран под навбар, iframe растягивается */
body.chat-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.chat-page .navbar {
    flex-shrink: 0;
}

body.chat-page main.container--chat {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.chat-page .chat-toolbar {
    flex-shrink: 0;
}

.forum-topics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forum-topic-row {
    display: block;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(20, 26, 18, 0.7);
    color: var(--text);
    text-decoration: none;
}

.forum-topic-row:hover {
    border-color: rgba(197, 224, 99, 0.45);
}

.forum-topic-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.forum-topic-meta {
    font-size: 0.9rem;
}

.forum-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.forum-badge-admin {
    border-color: rgba(197, 224, 99, 0.35);
    color: var(--accent);
}

.forum-badge-locked {
    border-color: rgba(212, 160, 23, 0.35);
    color: var(--hazard);
}

.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.forum-post {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 0.8rem;
    background: rgba(20, 26, 18, 0.55);
}

.forum-post-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.forum-post-author-name {
    font-weight: 700;
}

.forum-post-date {
    font-size: 0.9rem;
}

.forum-post-body {
    white-space: normal;
    word-break: break-word;
}

.forum-textarea {
    resize: vertical;
    min-height: 7rem;
    font-family: var(--font-display);
}

.admin-role-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.admin-role-form label {
    display: grid;
    gap: 0.35rem;
    min-width: 12rem;
}

.admin-role-form input,
.admin-role-form select {
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(20, 26, 18, 0.6);
    color: var(--text);
    font-family: var(--font-display);
}

.admin-role-form-wide {
    flex: 1 1 16rem;
    min-width: 14rem;
}

.admin-role-add-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.admin-roles-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-roles-table th,
.admin-roles-table td {
    padding: 0.5rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.role-title-input {
    width: 100%;
    min-width: 10rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(20, 26, 18, 0.6);
    color: var(--text);
    font-family: var(--font-display);
}

.navbar {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    padding-bottom: 0.45rem;
}

.nav-brand-row .nav-profile { margin-left: auto; }

.nav-main-row {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(197, 224, 99, 0.12);
}

.kbmt-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
}

.kbmt-brand-mark {
    font-family: var(--font-mono);
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
    background: var(--surface2);
    text-shadow: 0 0 12px rgba(197, 224, 99, 0.35);
}

.kbmt-brand-name {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.15rem;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent-dim);
}

.nav-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.nav-profile-link:hover,
.nav-profile-link.active {
    color: var(--accent);
    border-color: rgba(197, 224, 99, 0.35);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.nav-avatar-placeholder {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.container--chat {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-toolbar {
    max-width: 960px;
    margin: 0 auto 0.65rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.chat-heading {
    margin: 0;
    font-size: 1.5rem;
}

.chat-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.chat-frame-shell {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.chat-iframe {
    display: block;
    width: 100%;
    flex: 1 1 auto;
    min-height: 52vh;
    min-height: min(520px, 65dvh);
    border: none;
    vertical-align: top;
}

@media (max-width: 600px) {
    .chat-iframe {
        min-height: 45vh;
        min-height: min(420px, 58dvh);
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

h1, h2 {
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    font-weight: 700;
}

.muted { color: var(--text-muted); font-size: 0.95rem; }

.alert {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}
.alert.hidden { display: none; }
.alert-danger { background: rgba(196, 76, 58, 0.15); border-color: var(--danger); color: #f0c4bc; }
.alert-success { background: rgba(92, 184, 122, 0.12); border-color: var(--success); color: #c8edd4; }
.alert-warning { background: rgba(212, 160, 23, 0.12); border-color: var(--hazard); color: #f0e0a8; }
.alert-info { background: rgba(197, 224, 99, 0.08); border-color: var(--accent-dim); color: var(--text); }

.auth-box {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.auth-box h1 {
    margin-top: 0;
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-form label {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form input[type="file"] {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.password-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 0.35rem;
}
.password-field-row .password-input { flex: 1; min-width: 0; }

.btn-toggle-password {
    flex: 0 0 auto;
    padding: 0 0.65rem;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-align: center;
    max-width: min(100%, var(--btn-max-width));
    box-sizing: border-box;
    vertical-align: middle;
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent-dim), #4d5c24);
    color: #111;
    border-color: var(--accent);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent-dim); color: var(--accent); }

.btn-success {
    background: rgba(92, 184, 122, 0.25);
    color: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background: rgba(196, 76, 58, 0.2);
    color: #f5a898;
    border-color: var(--danger);
}

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

.btn-danger-outline {
    background: transparent;
    color: #f5a898;
    border-color: rgba(196, 76, 58, 0.55);
}
.btn-danger-outline:hover {
    border-color: var(--danger);
    color: #ffc9c0;
}

.auth-link { margin-top: 0.75rem; font-size: 0.9rem; }
.auth-link a { color: var(--accent); }

.auth-register-btn {
    display: block;
    margin: 1rem auto 0;
    width: fit-content;
    max-width: min(100%, var(--btn-max-width));
}

.kbmt-login-hero {
    position: relative;
    height: 120px;
    margin: 0 auto 0.5rem;
    max-width: 960px;
    overflow: hidden;
}

.kbmt-login-grid {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 47px, var(--grid-line) 47px 48px),
        repeating-linear-gradient(0deg, transparent 0 47px, var(--grid-line) 47px 48px);
    opacity: 0.7;
}

.kbmt-login-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    color: rgba(197, 224, 99, 0.12);
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

.auth-form-wrap { position: relative; }
.auth-sending-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(13, 16, 12, 0.88);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-form-wrap.is-sending .auth-sending-overlay { display: flex; }

.kbmt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: kbmt-spin 0.85s linear infinite;
}
@keyframes kbmt-spin { to { transform: rotate(360deg); } }

/* Gallery / files */
.gallery-breadcrumbs, .files-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.crumb {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0.15rem 0.25rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.crumb.current {
    color: var(--text);
    text-decoration: none;
    cursor: default;
}
.crumb-sep { color: var(--text-muted); user-select: none; }

.gallery-grid, .files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.gallery-tile {
    position: relative;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem;
    text-align: center;
    min-height: 120px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.gallery-tile:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 1px rgba(197, 224, 99, 0.15);
}

.gallery-folder .files-tile-main {
    width: 100%;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.gallery-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.gallery-name {
    font-size: 0.82rem;
    word-break: break-word;
    color: var(--text-muted);
    line-height: 1.25;
}

.files-header { margin-bottom: 1rem; }
.files-quota-bar {
    height: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0 0.25rem;
}
.files-quota-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    transition: width 0.3s ease;
}
.files-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.files-upload-label {
    cursor: pointer;
    margin: 0;
}
.files-tile-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    z-index: 1;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: none;
}
.btn-icon:hover { color: var(--accent); border-color: var(--accent-dim); }
.btn-icon-danger:hover { color: var(--danger); border-color: var(--danger); }

.files-file-icon {
    font-size: 2rem;
    color: var(--hazard);
    margin: 0.5rem 0 0.25rem;
}
.files-file-size { font-size: 0.75rem; margin-top: 0.25rem; }

.gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.gallery-viewer.hidden { display: none; }
.gallery-viewer.open { display: flex; }
.gallery-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.gallery-viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    cursor: pointer;
    z-index: 2;
}

.file-viewer .file-viewer-body {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0.5rem;
    box-sizing: border-box;
}

.file-viewer .file-viewer-body img {
    max-width: 100%;
    max-height: calc(100vh - 5rem);
    object-fit: contain;
}

.file-viewer-video {
    max-width: 100%;
    max-height: calc(100vh - 5rem);
    width: auto;
    height: auto;
}

.file-viewer-audio {
    width: min(100%, 420px);
    margin-top: 2rem;
}

.file-viewer-iframe {
    width: min(92vw, 960px);
    height: min(88vh, 1200px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #2a2a2a;
}

.file-viewer-text {
    margin: 0;
    padding: 1rem 1.25rem;
    max-width: min(96vw, 920px);
    max-height: calc(100vh - 5rem);
    overflow: auto;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.file-viewer-msg {
    max-width: 28rem;
    text-align: center;
    line-height: 1.5;
}

.files-tile-open {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: center;
}

.files-preview-wrap {
    position: relative;
    width: 100%;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.35rem;
    background: var(--bg);
    border: 1px solid var(--border);
}

.files-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.files-preview-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.files-preview-video .files-preview-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

.files-preview-badge-wrap {
    display: grid;
    place-items: center;
}

.files-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: 1px solid var(--border);
    color: var(--accent);
    background: rgba(197, 224, 99, 0.08);
}

.files-preview-pdf { color: #f5a898; border-color: rgba(196, 76, 58, 0.4); }
.files-preview-txt { color: var(--text-muted); }
.files-preview-audio { font-size: 1.25rem; color: var(--accent); }
.files-preview-generic { color: var(--hazard); font-size: 1.35rem; }

.gallery-tile.gallery-file {
    min-height: 148px;
}

.admin-settings-sub {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-pending-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-pending-table th,
.admin-pending-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-pending-table th {
    background: var(--surface2);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-pending-table tr:last-child td {
    border-bottom: none;
}

.admin-pending-actions {
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 0;
}

a.team-card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

a.team-card-link:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 1px rgba(197, 224, 99, 0.15);
}

a.team-card-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.team-card-top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.team-avatar-frame {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
    border-radius: var(--radius);
}

.team-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 2px solid var(--border);
    display: block;
}

.team-avatar-placeholder {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: var(--surface2);
}

.team-card-head {
    min-width: 0;
    flex: 1;
}

.team-name {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    line-height: 1.25;
    word-break: break-word;
}

.team-role {
    margin: 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dim);
    font-weight: 600;
}

.team-status {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.team-phone {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.profile-public-back {
    margin: 0 0 1rem;
}
.profile-public-back a {
    color: var(--accent);
}

/* Profile */
.profile-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
}
.profile-avatar { flex: 0 0 auto; text-align: center; }
.profile-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 2px solid var(--border);
}
.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    background: var(--surface2);
    border: 2px dashed var(--border);
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: var(--text-muted);
}
.profile-avatar-trigger {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
}
.profile-info { flex: 1 1 200px; min-width: 0; }
.profile-name { margin: 0 0 0.25rem; font-size: 1.35rem; }
.profile-meta { color: var(--text-muted); margin: 0 0 0.75rem; font-size: 0.95rem; }
.profile-kv { display: flex; flex-direction: column; gap: 0.5rem; }
.profile-kv-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem;
    align-items: start;
    font-size: 0.95rem;
}
.profile-kv-key { color: var(--text-muted); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; }
.profile-kv-val { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.wall-action-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.2rem;
    cursor: pointer;
    color: var(--text-muted);
}
.wall-action-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.wall-action-btn__icon { display: block; width: 18px; height: 18px; }

/* Profile photo crop (как в rt_web) */
.profile-crop-ui { margin: 0.75rem 0; }
.profile-crop-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}
.profile-crop-col { min-width: 0; }
.profile-crop-hint { margin-bottom: 0.25rem; font-size: 0.9rem; }
.profile-crop-canvas {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    touch-action: none;
    max-width: 100%;
    height: auto;
}
.profile-crop-preview {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.profile-crop-slider-wrap { margin-top: 0.5rem; }
.profile-crop-slider-label {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.profile-crop-range { width: min(220px, 100%); accent-color: var(--accent); }
.profile-crop-note { margin: 0.5rem 0 0; font-size: 0.85rem; }

.hidden { display: none !important; }

@media (max-width: 520px) {
    .profile-kv-row { grid-template-columns: 1fr; }
    .kbmt-brand-name { font-size: 1.35rem; letter-spacing: 0.18em; }
}
