@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&subset=latin,cyrillic&display=swap");

/**
 * TellMe unified shell — dark theme aligned with Telegram-style chat UI.
 * Scope: body.tellme-panel | body.tellme-auth | body.tellme-landing
 */

.tellme-shell {
    --tg-shell: #17212b;
    --tg-shell-elevated: #1f2d3d;
    --tg-shell-deep: #0e1621;
    --tg-accent: #5eb5f7;
    --tg-accent-soft: rgba(94, 181, 247, 0.22);
    --tg-border: rgba(255, 255, 255, 0.08);
    --tg-text: #e8edf2;
    --tg-muted: #8a9aad;
    --tg-sidebar-hover: rgba(255, 255, 255, 0.05);
    --tg-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Make 100% viewport resemble ~120% browser zoom (brand request). */
body.tellme-shell {
    font-size: 120%;
}

/* Restore keyboard focus (ready.css removes outlines globally) */
.tellme-shell *:focus-visible {
    outline: 2px solid var(--tg-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--tg-accent-soft) !important;
}

@media (prefers-reduced-motion: reduce) {
    .tellme-shell * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ========== Panel (Bootstrap dashboard) ========== */
body.tellme-shell.tellme-panel {
    background: var(--tg-shell-deep);
    color: var(--tg-text);
    font-family: var(--tg-font), "Nunito", system-ui, sans-serif;
}

body.tellme-shell.tellme-panel .wrapper {
    background: var(--tg-shell-deep);
}

body.tellme-shell.tellme-panel .main-header {
    background: linear-gradient(180deg, #243447 0%, var(--tg-shell) 100%);
    border-bottom: 1px solid var(--tg-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

body.tellme-shell.tellme-panel .main-header .logo-header {
    border-right: 1px solid var(--tg-border);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .main-header .logo-header a.logo {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .sidebar {
    background: var(--tg-shell);
    border-right: 1px solid var(--tg-border);
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.35);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .sidebar .user {
    border-bottom: 1px solid var(--tg-border);
}

body.tellme-shell.tellme-panel .sidebar .user .info a > span {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .sidebar .user .info a > span .user-level {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .sidebar .user .info .caret {
    border-top-color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item a {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item.active a {
    color: var(--tg-text);
    background: var(--tg-sidebar-hover);
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item.active a:before {
    background: var(--tg-accent) !important;
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item.active a i {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item a:hover,
body.tellme-shell.tellme-panel .sidebar .nav .nav-item a:focus {
    background: var(--tg-sidebar-hover);
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item:hover a:before {
    background: var(--tg-accent);
    opacity: 0.6 !important;
}

body.tellme-shell.tellme-panel .sidebar .nav .nav-item a i {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .main-panel {
    background: var(--tg-shell-deep);
}

body.tellme-shell.tellme-panel .main-panel .content {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .main-panel .content a {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .main-panel .content a:hover {
    color: #8fd4ff;
}

body.tellme-shell.tellme-panel .footer {
    background: var(--tg-shell-elevated);
    border-top: 1px solid var(--tg-border);
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel h4.page-title {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .card {
    background: var(--tg-shell-elevated);
    border: 1px solid var(--tg-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

body.tellme-shell.tellme-panel .card .card-header {
    border-bottom: 1px solid var(--tg-border) !important;
    background: transparent;
}

body.tellme-shell.tellme-panel .card .card-title {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .card .card-category,
body.tellme-shell.tellme-panel .card label {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .card .card-sub {
    background: rgba(255, 255, 255, 0.04);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .card .card-footer,
body.tellme-shell.tellme-panel .card .card-action {
    border-top: 1px solid var(--tg-border) !important;
}

body.tellme-shell.tellme-panel .table {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .table thead th {
    border-color: var(--tg-border);
    color: var(--tg-muted);
    background: rgba(0, 0, 0, 0.2) !important;
}

body.tellme-shell.tellme-panel .table td,
body.tellme-shell.tellme-panel .table th {
    border-color: var(--tg-border);
}

body.tellme-shell.tellme-panel .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

body.tellme-shell.tellme-panel .form-control {
    background: #242f3d;
    border: 1px solid var(--tg-border);
    color: var(--tg-text);
    border-radius: 10px;
}

body.tellme-shell.tellme-panel .form-control:focus {
    border-color: var(--tg-accent);
    box-shadow: 0 0 0 3px var(--tg-accent-soft);
    background: #2c3848;
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .navbar-header {
    background: transparent;
}

body.tellme-shell.tellme-panel .navbar.navbar-header {
    border-bottom: none;
}

body.tellme-shell.tellme-panel .dropdown-menu {
    background: var(--tg-shell-elevated);
    border: 1px solid var(--tg-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.tellme-shell.tellme-panel .dropdown-item {
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .dropdown-item:hover,
body.tellme-shell.tellme-panel .dropdown-item:focus {
    background: var(--tg-sidebar-hover);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .btn-primary {
    background: linear-gradient(180deg, #6bc2ff 0%, #3a9ee8 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

body.tellme-shell.tellme-panel .btn-primary:hover {
    filter: brightness(1.06);
}

body.tellme-shell.tellme-panel .btn-secondary,
body.tellme-shell.tellme-panel .btn-default {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--tg-border);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .alert {
    border-radius: 10px;
    border-width: 1px;
}

body.tellme-shell.tellme-panel .alert-success {
    background: rgba(46, 160, 90, 0.2);
    border-color: rgba(46, 160, 90, 0.45);
    color: #a8e6c4;
}

body.tellme-shell.tellme-panel .alert-danger {
    background: rgba(220, 80, 80, 0.2);
    border-color: rgba(220, 80, 80, 0.45);
    color: #ffb4b4;
}

body.tellme-shell.tellme-panel .alert-info {
    background: rgba(94, 181, 247, 0.15);
    border-color: rgba(94, 181, 247, 0.35);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .badge,
body.tellme-shell.tellme-panel .label {
    border-radius: 8px;
}

body.tellme-shell.tellme-panel .modal-content {
    background: var(--tg-shell-elevated);
    border: 1px solid var(--tg-border);
    border-radius: 14px;
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .modal-header {
    border-bottom: 1px solid var(--tg-border);
}

body.tellme-shell.tellme-panel .modal-footer {
    border-top: 1px solid var(--tg-border);
}

body.tellme-shell.tellme-panel .nav-tabs .nav-link {
    color: var(--tg-muted);
    border-radius: 10px 10px 0 0;
}

body.tellme-shell.tellme-panel .nav-tabs .nav-link.active {
    background: var(--tg-shell-elevated);
    border-color: var(--tg-border);
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .pagination .page-link {
    background: var(--tg-shell-elevated);
    border-color: var(--tg-border);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .pagination .page-item.active .page-link {
    background: var(--tg-accent);
    border-color: var(--tg-accent);
    color: #0e1621;
}

/* Panel: embedded chat card (title without duplicating peer name; name only in iframe header) */
body.tellme-shell.tellme-panel .panel-pm-chat-card-head .card-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Sidebar mini lists (panel user search) — dark tokens */
body.tellme-shell.tellme-panel .sidebar-mini-lists {
    border-top-color: var(--tg-border);
}

body.tellme-shell.tellme-panel .sidebar-create-btn {
    border-color: var(--tg-border);
    background: linear-gradient(180deg, rgba(94, 181, 247, 0.18) 0%, rgba(94, 181, 247, 0.06) 100%);
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .sidebar-create-btn i {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .sidebar-create-btn:hover {
    background: linear-gradient(180deg, rgba(94, 181, 247, 0.28) 0%, rgba(94, 181, 247, 0.12) 100%);
    border-color: var(--tg-accent);
    color: #ffffff;
}

body.tellme-shell.tellme-panel .sidebar-mini-title {
    color: var(--tg-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

body.tellme-shell.tellme-panel .sidebar-mini-item {
    color: var(--tg-text);
    font-size: 13px;
    font-weight: 500;
}

body.tellme-shell.tellme-panel .sidebar-mini-item i {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .sidebar-mini-user-name,
body.tellme-shell.tellme-panel a.sidebar-mini-user-name {
    color: var(--tg-text);
    font-size: 14px;
    font-weight: 600;
}

body.tellme-shell.tellme-panel a.sidebar-mini-user-name:hover {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .sidebar-user-search {
    border-color: var(--tg-border);
    background: #242f3d;
    color: var(--tg-text);
}

body.tellme-shell.tellme-panel .sidebar-user-search:focus {
    border-color: var(--tg-accent);
    box-shadow: 0 0 0 3px var(--tg-accent-soft);
    background: #2c3848;
}

body.tellme-shell.tellme-panel .sidebar-mini-empty {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-panel .sidebar-mini-user-actions a {
    color: var(--tg-accent);
}

body.tellme-shell.tellme-panel .sidebar-mini-user-actions a:hover {
    color: #8fd4ff;
}

/* Semantic UI inside panel */
body.tellme-shell.tellme-panel .ui.segment {
    background: var(--tg-shell-elevated) !important;
    border-color: var(--tg-border) !important;
    color: var(--tg-text) !important;
}

body.tellme-shell.tellme-panel .ui.table {
    background: transparent !important;
    color: var(--tg-text) !important;
}

/* ========== Auth (signin / signup / recover / password) ========== */
body.tellme-shell.tellme-auth {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(94, 181, 247, 0.22), transparent 55%),
        linear-gradient(165deg, var(--tg-shell-deep) 0%, #0a1018 100%);
    color: var(--tg-text);
    font-family: var(--tg-font), system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.tellme-shell.tellme-auth main.form-signin {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px 40px;
    margin: 0 auto;
    background: rgba(31, 45, 61, 0.92);
    border: 1px solid var(--tg-border);
    border-radius: 18px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

body.tellme-shell.tellme-auth .form-signin img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

body.tellme-shell.tellme-auth .form-signin h1,
body.tellme-shell.tellme-auth .form-signin .h3 {
    color: var(--tg-text);
}

body.tellme-shell.tellme-auth .form-signin .p,
body.tellme-shell.tellme-auth .form-signin p {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-auth .auth-tabs {
    border-bottom-color: var(--tg-border);
}

body.tellme-shell.tellme-auth .auth-tabs .nav-link {
    font-weight: 600;
    color: var(--tg-muted);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
}

body.tellme-shell.tellme-auth .auth-tabs .nav-link.active {
    color: var(--tg-accent);
    border-bottom-color: var(--tg-accent);
}

body.tellme-shell.tellme-auth .auth-tabs .nav-link:hover {
    color: var(--tg-text);
}

body.tellme-shell.tellme-auth .form-control {
    background: #242f3d;
    border: 1px solid var(--tg-border);
    color: var(--tg-text);
    border-radius: 10px;
    padding: 12px 14px;
}

body.tellme-shell.tellme-auth .form-control:focus {
    border-color: var(--tg-accent);
    box-shadow: 0 0 0 3px var(--tg-accent-soft);
    background: #2c3848;
}

body.tellme-shell.tellme-auth label {
    color: var(--tg-muted);
    font-size: 13px;
}

body.tellme-shell.tellme-auth .btn-primary {
    background: linear-gradient(180deg, #6bc2ff 0%, #3a9ee8 100%);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding-top: 12px;
    padding-bottom: 12px;
}

body.tellme-shell.tellme-auth .btn-primary:hover {
    filter: brightness(1.06);
}

body.tellme-shell.tellme-auth .alert-danger {
    background: rgba(220, 80, 80, 0.18);
    border: 1px solid rgba(220, 80, 80, 0.45);
    color: #ffb4b4;
    border-radius: 10px;
}

body.tellme-shell.tellme-auth .alert-success {
    background: rgba(46, 160, 90, 0.18);
    border: 1px solid rgba(46, 160, 90, 0.45);
    color: #a8e6c4;
    border-radius: 10px;
}

body.tellme-shell.tellme-auth .transparent {
    color: var(--tg-accent) !important;
}

/* ========== Landing (index) ========== */
body.tellme-shell.tellme-landing {
    background: var(--tg-shell-deep);
    color: var(--tg-text);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body.tellme-shell.tellme-landing .pageWrapper {
    background: var(--tg-shell-deep);
}

body.tellme-shell.tellme-landing .navbar-default.topmenu {
    background: linear-gradient(180deg, #243447 0%, var(--tg-shell) 100%);
    border-bottom: 1px solid var(--tg-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

body.tellme-shell.tellme-landing .navbar-default .navbar-brand {
    padding-top: 10px;
}

body.tellme-shell.tellme-landing .navbar-default .navbar-nav > li > a,
body.tellme-shell.tellme-landing .navbar-default .navbar-brand {
    color: var(--tg-text) !important;
}

body.tellme-shell.tellme-landing .btn-success.panel {
    background: linear-gradient(180deg, #5ecf8a 0%, #2ea85c 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

body.tellme-shell.tellme-landing .bs-header {
    background: linear-gradient(135deg, rgba(94, 181, 247, 0.15) 0%, rgba(23, 33, 43, 0.95) 50%, var(--tg-shell-deep) 100%);
    border-bottom: 1px solid var(--tg-border);
    color: var(--tg-text);
}

body.tellme-shell.tellme-landing .bs-header h1 {
    color: var(--tg-text);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

body.tellme-shell.tellme-landing .bs-header p {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-landing .container.content,
body.tellme-shell.tellme-landing .content {
    color: var(--tg-text);
}

body.tellme-shell.tellme-landing .content h3,
body.tellme-shell.tellme-landing .headingz {
    color: var(--tg-text);
}

body.tellme-shell.tellme-landing .media-body {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-landing .btn-success {
    background: linear-gradient(180deg, #5ecf8a 0%, #2ea85c 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

body.tellme-shell.tellme-landing .btn-primary {
    background: linear-gradient(180deg, #6bc2ff 0%, #3a9ee8 100%);
    border: none;
    border-radius: 10px;
}

body.tellme-shell.tellme-landing .btn-default {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--tg-border);
    color: var(--tg-text);
}

body.tellme-shell.tellme-landing .pageFooter {
    background: var(--tg-shell);
    border-top: 1px solid var(--tg-border);
    color: var(--tg-muted);
}

body.tellme-shell.tellme-landing .copyright p {
    color: var(--tg-muted);
}

body.tellme-shell.tellme-landing iframe[title='Chat Room'] {
    border-radius: 12px;
    border: 1px solid var(--tg-border);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

body.tellme-shell.tellme-landing .howWorksList li {
    color: var(--tg-muted);
}

/* ========== Ban page ========== */
body.tellme-shell.tellme-ban {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 120% 70% at 50% -15%, rgba(220, 80, 80, 0.18), transparent 50%),
        linear-gradient(165deg, var(--tg-shell-deep) 0%, #0a1018 100%);
    color: var(--tg-text);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body.tellme-shell.tellme-ban .section-container {
    background: rgba(31, 45, 61, 0.65) !important;
    border: 1px solid var(--tg-border);
}

body.tellme-shell.tellme-ban .section-item h2,
body.tellme-shell.tellme-ban .cf-error-details {
    color: var(--tg-text);
}

body.tellme-shell.tellme-ban *:focus-visible {
    outline: 2px solid var(--tg-accent);
    outline-offset: 2px;
}
