:root {
    --bg: #f8fafc;
    --sidebar: #1e293b;
    --border: #e2e8f0;
    --primary: #5c7cfa;
    --text: #475569;
    --text-dark: #1e293b;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 90px;
    /* Узкое меню как на скрине */
    background: #1a222d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
}

.sidebar.unlimited {
    width: max-content;
    padding: 15px 10px;
}

.logo {
    color: #fff;
    font-size: 14px;
    margin-bottom: 30px;
    font-weight: bold;
}

.sidebar-scroll {
    width: 100%;
}

.menu-description {
    color: #fff;
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
    /* font-weight: bold; */
}

.menu-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.section-label {
    color: #4a5568;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.nav-item,
.menu-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    cursor: pointer;
    transition: 0.2s;
}

.menu-nav-item {
    flex-direction: row;
    align-items: flex-start;
    padding: 20px 0px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 5px;
    text-align: center;
}

.nav-item:hover span,
.nav-item.active span {
    color: #fff;
}

.nav-icon,
.menu-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 25px;
}

.menu-nav-item #decor {
    display: flex;
    flex-direction: column;
}

.menu-nav-item #title {
    color: white;
    font-size: 20px;
}

.menu-nav-item.active #title,
.menu-nav-item:hover #title,
.menu-nav-item.active>.menu-nav-icon,
.menu-nav-item:hover>.menu-nav-icon {
    color: #1a222d;
}

.menu-nav-item.active,
.menu-nav-item:hover {
    background-color: white;
    border-radius: 8px;
    padding-right: 5px;
}

/* Цвета иконок */
.main-bg {
    background: #3b82f6;
}

.blue {
    background: #60a5fa;
}

.purple {
    background: #a78bfa;
}

.red {
    background: #f87171;
}

.green {
    background: #4ade80;
}

.orange {
    background: #fb923c;
}

.cyan {
    background: #22d3ee;
}

.gray {
    background: #64748b;
}

.menu-divider {
    width: 40px;
    height: 1px;
    background: #2d3748;
    margin: 10px auto;
}

.user-avatar-small img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #84cc16;
    /* Зеленая полоска активности */
}


/* Main Content */

.settings_page {
    transition: 0.3s opacity;
}

.main-content {
    flex: 1;
    overflow-x: hidden;
}

.top-bar {
    background: white;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #64748b;
}

.project-select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.plus-btn {
    background: #84cc16;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

.top-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #64748b;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #475569;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Modules Grid */
.container {
    padding: 25px 35px;
}

.ai-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.module-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: 0.2s;
}

.module-item.active {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(92, 124, 250, 0.1);
}


.module-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(92, 124, 250, 0.1);
}

.m-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.m-text strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
}

.m-text p {
    font-size: 11px;
    margin: 0;
    color: #94a3b8;
}

.purple {
    background: #a855f7;
}

.blue {
    background: #3b82f6;
}

.green {
    background: #22c55e;
}

.red {
    background: #ef4444;
}

.orange {
    background: #f59e0b;
}

.cyan {
    background: #06b6d4;
}

/* Action Header */
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

/* Search Bar */
.search-bar {
    display: flex;
    margin-bottom: 25px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px 0 0 6px;
    outline: none;
}

.search-bar button {
    padding: 0 25px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 8px;
    display: flex;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-col {
    padding: 20px;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.last-col {
    border-right: none;
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.info-col {
    width: 300px;
}

.action-col {
    width: 220px;
    text-align: center;
}

.project-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.project-name a {
    text-decoration: none;
    color: #5c7cfa;
    font-weight: 500;
}

.project-name img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.history-list p {
    font-size: 12px;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.history-list span {
    color: #94a3b8;
}

.history-list em {
    font-style: normal;
    color: #cbd5e1;
}

.link-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.link-btn:hover {
    color: var(--primary);
}

.link-btn.highlight {
    color: #818cf8;
}

.stat-box {
    font-size: 13px;
}

.error-txt {
    color: #ef4444;
    font-weight: bold;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dots-btn {
    background: #f8fafc;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    color: #94a3b8;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    z-index: 100;
    border: 1px solid var(--border);
    padding: 5px 0;
}

.dropdown-content a {
    color: #475569;
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.dropdown-content a i {
    width: 16px;
    color: #94a3b8;
}

.dropdown-content a:hover {
    background: #f8fafc;
}

.dropdown-content hr {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 5px 0;
}

.dropdown-content .delete-action {
    color: #ef4444;
}

.show {
    display: block;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field label {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

.field input,
.field textarea,
.field select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: var(--text-dark);
    outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--primary);
}

.dynamic-list input {
    margin-bottom: 8px;
}

.list-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.btn-clear {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.btn-clear:hover {
    background: #e2e8f0;
}


.keywords-box {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    background: white;
}

.keywords-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.keywords-actions button {
    font-size: 12px;
}

.keywords-box input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.keywords-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keywords-list li {
    padding: 6px 8px;
    border-radius: 4px;
    transition: 0.2s;
}

.keywords-list li:hover {
    background: #f1f5f9;
}

.keywords-list label {
    font-size: 13px;
    cursor: pointer;
}

.kw-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.kw-btn.add {
    background: var(--primary);
    color: white;
}

.kw-btn.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.kw-btn.delete:hover {
    background: #fecaca;
}


.field small {
    font-size: 11px;
    color: #94a3b8;
}

.toggle-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.toggle-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: #475569;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.toggle-panel {
    display: none;
}

.toggle-panel.active {
    display: block;
}

.groups-box {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    background: white;
}

.keyword-group {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8fafc;
    cursor: grab;
}

.group-title {
    font-size: 13px;
    font-weight: 500;
}

.group-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 12px;
}

.group-keywords {
    list-style: none;
    padding: 8px 10px;
}

.group-keywords li {
    padding: 4px 0;
    cursor: grab;
}

.keyword-group.collapsed .group-keywords {
    display: none;
}

.dragging {
    opacity: 0.5;
}

.seo-table-wrapper {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.seo-table thead {
    background: #f8fafc;
}

.seo-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 500;
    color: #475569;
    border-bottom: 1px solid var(--border);
}

.seo-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

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

/* cluster name */
.cluster-name {
    font-weight: 500;
    color: var(--text-dark);
}

/* status */
.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status.ok {
    background: #dcfce7;
    color: #166534;
}

.status.fail {
    background: #fee2e2;
    color: #991b1b;
}

/* urls */
.cluster-urls ul {
    margin: 0;
    padding-left: 16px;
}

.cluster-urls li {
    margin-bottom: 4px;
}

.cluster-urls a {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
}

.cluster-urls a:hover {
    text-decoration: underline;
}

.cluster-urls .empty {
    color: #94a3b8;
}


.radial-module {
    position: relative;
    width: 700px;
    height: 700px;
    margin: auto auto;
}

.radial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    background: var(--primary);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.radial-center {
    position: absolute;
    left: 350px;
    top: 350px;
    transform: translate(-50%, -50%);
}


.radial-item {
    position: absolute;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.radial-item,
.radial-item #text,
.radial-center #text {
    width: 90px;
    height: 90px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    /* overflow: hidden; */
}

.radial-center #text {
    width: 110px;
    height: 110px;
    background: var(--primary);
    border: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    /* overflow: hidden; */
}

.radial-item:hover {
    transform: scale(1.08);
}

@keyframes floaty {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        transform: translate(calc(-50% + 12px), calc(-50% - 10px)) rotate(3deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

.radial-item {
    animation: floaty 5s ease-in-out infinite;
    z-index: 2;
}


.radial-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.branch {
    stroke-linecap: round;
    animation: branchMove 6s ease-in-out infinite;
}

@keyframes branchMove {
    0% {
        transform: translate(0px, 0px);
    }

    50% {
        transform: translate(6px, -4px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

.radial-item .glow, .radial-center .glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    filter: blur(40px);
    z-index: -1;
    animation: gl_anim 5s ease-in-out infinite;
    transition: 1s;
    opacity: 0;
}


/* .radial-item.uncreate .glow {
    background-color: rgba(255,46,157,1);
    } */
    
.radial-item.create .glow, .radial-center.create .glow {
    background-color: rgba(45,255,196,1);
    opacity: 1;
}

.radial-item.creating .glow, .radial-center.creating .glow {
    background-color: rgba(102, 46, 255, 1);
    animation: gl_anim 5s ease-in-out infinite,
    gl_anim_creating 2s ease-in-out infinite;
    opacity: 1;
}

.radial-item.disable:after {
    content: '\f023';
    font-family: "Font Awesome 5 Free"; 
    /* text-align: center; */
    font-weight: 900;
    font-size: 20px;
    top: 10%;
    left: 10%;
    transform: translate(-5%, -5%);
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 90%;
    background-color: white;
    opacity: 0.9;
    z-index: 5;
}

.radial-item #hover, .radial-center #hover {
    font-weight: 900;
    font-size: 40px;
    top: 10%;
    left: 10%;
    transform: translate(-5%, -5%);
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 90%;
    background-color: white;
    opacity: 0;
    z-index: 5;
    transition: 0.3s;
}

.radial-center #hover {
    background: var(--primary);
}

.radial-item:hover #hover, .radial-center:hover #hover {
    opacity: 0.9;
}

@keyframes gl_anim {
    0% {
        filter: blur(80px);
    }

    50% {
        filter: blur(50px);
    }

    100% {
        filter: blur(80px);
    }
}

@keyframes gl_anim_creating {
    0% {
        background-color: #4d2eff;
    }

    50% {
        background-color: #2e93ff;
    }

    100% {
        background-color: #4d2eff;
    }
}

#recomendation_div, #site_div, #seo_div, #competitors_div, #feedbacks_div {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.recomendation {
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    border: 1px solid var(--border);
    padding: 20px 40px;
    gap: 20px;
    background-color: white;
}

.recomendation.audit_site {
    padding: 1px 20px 30px 20px;
    position: relative;
    gap: 10px;
    align-items: center;
}

.recomendation.audit_site #fake {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 15px;
    overflow: hidden;
}

.recomendation.audit_site #fake::after, .recomendation.audit_site #fake::before {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 100px;
    height: 100px;
    background-color: black;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.1;
}
.recomendation.audit_site #fake::before {
    top: -50px;
    left: -50px;
}


.recomendation.audit_site #icon {
    position: absolute;
    top: -50px;
    right: -20px;
    /* width: 100%; */
    height: auto;
    aspect-ratio: 1 / 1;
    color: grey;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100px;
    z-index: 0;
}
.recomendation.audit_site #icon i {
    display: flex;
}

.recomendation.audit_site #data {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 80%;
}

.recomendation.audit_site #data .item {
    display: flex;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 20px;
}

.recomendation.audit_site #data.green_ .item:nth-child(1) { background-color: rgba(119, 221, 119, 0.8); }
.recomendation.audit_site #data.green_ .item:nth-child(2) { background-color: rgba(119, 221, 119, 0.6); }
.recomendation.audit_site #data.green_ .item:nth-child(3) { background-color: rgba(119, 221, 119, 0.4); }
.recomendation.audit_site #data.green_ .item:nth-child(4) { background-color: rgba(119, 221, 119, 0.2); }
.recomendation.audit_site #data.green_ .item:nth-child(5) { background-color: rgba(119, 221, 119, 0.1); }


.recomendation.audit_site #data.red_ .item:nth-child(1) { background-color: rgba(246, 97, 81, 0.8); }
.recomendation.audit_site #data.red_ .item:nth-child(2) { background-color: rgba(246, 97, 81, 0.6); }
.recomendation.audit_site #data.red_ .item:nth-child(3) { background-color: rgba(246, 97, 81, 0.4); }
.recomendation.audit_site #data.red_ .item:nth-child(4) { background-color: rgba(246, 97, 81, 0.2); }
.recomendation.audit_site #data.red_ .item:nth-child(5) { background-color: rgba(246, 97, 81, 0.1); }

.recomendation.audit_site #data.blue_ .item:nth-child(1) { background-color: rgba(153, 193, 241, 0.8); }
.recomendation.audit_site #data.blue_ .item:nth-child(2) { background-color: rgba(153, 193, 241, 0.6); }
.recomendation.audit_site #data.blue_ .item:nth-child(3) { background-color: rgba(153, 193, 241, 0.4); }
.recomendation.audit_site #data.blue_ .item:nth-child(4) { background-color: rgba(153, 193, 241, 0.2); }
.recomendation.audit_site #data.blue_ .item:nth-child(5) { background-color: rgba(153, 193, 241, 0.1); }

.recomendation #head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.recomendation #head #name, .recomendation .title {
    font-weight: bold;
    font-size: 23px;
}

.recomendation #head #right div:nth-child(2) {
    font-weight: 700;
    font-size: 16px;
}

.recomendation #head #right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
}

.recomendation #content {
    display: flex;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    flex-direction: column;
    gap: 20px;
}

.radar_div {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 15px;
    border: 1px solid var(--border);
    background-color: white;
    width: 600px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

#competitors_div table {
    width: 600px;
    border-collapse: collapse;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

#competitors_div th, #competitors_div td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

#competitors_div th {
    background: #f0f0f0;
    font-weight: bold;
}

#competitors_div .row-green {
    background-color: #dff5e1;
}

#competitors_div .row-red {
    background-color: #f8d7da;
}

#feedbacks_div .tree {
    transition:transform .3s ease;
}

#feedbacks_div .tree #comments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #1a222d;
}

#feedbacks_div .tree .comment {
    display: flex;
    background-color: #f66151;
    width: 400px;
    border-radius: 10px;
    padding: 10px;
    /* position: relative; */
}

#feedbacks_div .tree .comment.positive {
    background-color: #8ff0a4;
}

#feedbacks_div .tree .comment_data {
    position: relative;
}

#feedbacks_div .tree .comment.result {
    position: absolute;
    transform: translate(0%, 0%);
    right: 0;
    background-color: var(--border);
    top: 0;
}
#feedbacks_div .tree .comment::after {
    position: absolute;
    content: '';
    top: 50%;
    left: 410px;
    transform: translate(50%, -50%);
    background-color: #06b6d4;
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

#feedbacks_div .tree .comment.result::after {
    position: absolute;
    content: '';
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    background-color: #06b6d4;
    border-radius: 50%;
    width: 10px;
    height: 10px;
}