body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #0d0d0d;
    color: #e0e0e0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

a {
    text-decoration: none;;
}

table a{
    color: white;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #141414;
    border-right: 1px solid #222;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar h2 {
    color: white;
    font-size: 18px;
    text-align: center;
    margin-bottom: 25px;
}

.nav {
    flex: 1;
}

.nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    border-radius: 8px;
    margin: 5px 0;
    transition: 0.2s;
}

.nav a:hover {
    background: #1f1f1f;
    color: #fff;
}

.nav svg {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Chat */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-width: 1000px;
    margin: 0 auto;
    flex-direction: column;
    display: flex;
    width: 100%;
}

.message {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 30px;
    max-width: 90%;
    line-height: 1.5;
    white-space: pre-wrap;
}

.user {
    background: #252628;
    align-self: flex-end;
    text-align: right;
    color: #fff;
    border: 1px solid #ffffff33;
    border-radius: 30px 30px 10px 30px;
}

.ai {
    background: transparent;
    align-self: flex-start;
    text-align: left;
    color: #e0e0e0;
}

/* Input area */
.input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #222;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    background: transparent;
    border: none;
}

.input-area textarea {
    flex: 1;
    resize: none;
    border: none;
    border-radius: 200px;
    padding: 16px 20px;
    font-size: 14px;
    background: #1f1f1f;
    color: #fff;
    max-height: 52px;
    box-sizing: border-box;
}

.input-area button {
    margin-left: 10px;
    padding: 12px 20px;
    background: #6980ff;
    border: none;
    border-radius: 200px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.input-area button:hover {
    background: #00a6d6;
}

/* "думает" */
.thinking {
    font-style: italic;
    color: #888;
    animation: blink 1.5s infinite;
}

.home-infotext {
    background: #0f0f0f;
    border: 1px solid #ffffff38;
    border-radius: 30px;
    padding: 40px;
    max-width: 800px;
    margin: auto;
}

.home-infotext h2 {
    font-size: 24px;
}

.home-infotext p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 140%;
}

.home-infotext a {
    color: #6980ff;
    font-weight: 700;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 22px;
    margin: 0;
}

/* Form */
.form-container {
    background: #141414;
    padding: 30px;
    border-radius: 12px;
    max-width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 14px;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1f1f1f;
    color: #fff;
    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #00c6ff;
}

/* Buttons */
.btn {
    background: #00c6ff;
    color: #000;
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
}

.btn:hover {
    background: #00a6d6;
}

.btn-secondary {
    background: #1f1f1f;
    color: #aaa;
    border: 1px solid #333;
    /* margin-left: 10px; */
}

.btn-secondary:hover {
    background: #2a2a2a;
    color: #fff;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: #141414;
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #222;
}

th {
    background: #1f1f1f;
    color: #aaa;
    font-weight: normal;
}

tr:hover td {
    background: #1a1a1a;
}

.token {
    color: #888;
    font-family: monospace;
}

.action-btn {
    background: #1e1e1e;
    color: #00c6ff;
    border: 1px solid #00c6ff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.action-btn:hover {
    background: #00c6ff;
    color: #000;
}

.chat-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 25px;
    background: #101010;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1f1f1f;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.label {
    color: #999;
    font-size: 13px;
}

.status-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    width: fit-content;
}

.status-done {
    background: #093;
    color: #fff;
}

.status-pending {
    background: #cc0;
    color: #000;
}

.status-error {
    background: #c00;
    color: #fff;
}

.status-loading {
    background: #444;
    color: #ccc;
}
