:root {
    --font: "Geist", sans-serif;
    --font-secondary: "Manrope", sans-serif;
    --light-border: #dddddd;
    --light-text: #717680;
    --active-background: #a7a7a71a;
}

body {
    font-family: var(--font);
    overflow: hidden;
}

h1,
h2,
h3 {
    font-family: var(--font-secondary);
    margin: 0px;
}

p {
    color: var(--light-text);
    margin: 0px;
}

a {
    color: black;
    text-decoration: none;
}

input {
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-family: var(--font);
    padding: 10px;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    outline: none;
}

textarea {
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-family: var(--font);
    padding: 10px;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    outline: none;
    resize: none;
    height: 150px;
}

button {
    font-family: var(--font-secondary);
    border: none;
    border-radius: 8px;
    background-color: black;
    color: white;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

button.center {
    gap: 10px;
}

.white-btn {
    background-color: white;
    border: 1px solid var(--light-border);
    color: black;
}

.white-btn:hover {
    background-color: rgb(248, 248, 248);
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.start {
    display: flex;
    align-items: start;
    justify-content: start;
}

.gap {
    gap: 10px;
}

.between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column {
    display: flex;
    flex-direction: column;
}

#main-logo {
    gap: 10px;
    position: absolute;
    top: 30px;
    left: 30px;
}

#main-logo img {
    height: 45px;
}

.full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card {
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--light-border);
}

#login-card {
    width: 350px;
}

.vertical-form {
    gap: 5px;
}

.vertical-form p {
    margin: 5px 0px 15px 0px;
}

.vertical-form input {
    margin-bottom: 10px;
    width: calc(100% - 20px);
}

.vertical-form button {
    margin-top: 10px;
    width: 100%;
}

#sidenav {
    position: absolute;
    top: 0;
    left: 0;
    height: calc(100% - 40px);
    width: 230px;
    padding: 20px;
    border-right: 1px solid var(--light-border);
}

#sidenav>div {
    width: 100%;
}

#nav-logo {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
    margin-bottom: 30px;
}

#nav-logo img {
    height: 35px;
}

#dashboard-main {
    position: absolute;
    top: 0;
    left: 270px;
    height: calc(100% - 60px);
    width: calc(100% - 330px);
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
}

#profile-card {
    position: absolute;
    top: 30px;
    right: 30px;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
    padding-right: 30px;
}

#profile-card img {
    height: 40px;
    width: 40px;
    border-radius: 50px;
}

#profile-card span {
    color: var(--light-text);
    font-size: 14px;
}

#profile-card a {
    font-weight: 500;
}

.nav-list {
    display: flex;
    align-items: start;
    justify-content: start;
    width: 100%;
    flex-direction: column;
}

.nav-list a {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 8px;
    transition: all 0.3s ease;
    width: calc(100% - 20px);
    padding: 10px;
    border-radius: 8px;
}

.nav-list a:hover {
    background-color: #d3d3d31a;
}

.nav-list .active {
    background-color: var(--active-background);
    color: black;
}

.nav-list img {
    filter: brightness(0) !important;
}

.nav-list img {
    height: 17px;
    width: 17px;
}

.top-header {
    margin-bottom: 10px;
}

#data-select {
    gap: 5px;
}

#data-select a {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
}

#data-select .active {
    background-color: var(--active-background);
}

.line {
    width: calc(100% + 60px);
    border-top: 1px solid var(--light-border);
    margin: 20px 0px;
    transform: translateX(-30px);
}

.search-container {
    border: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: start;
    border: 1px solid var(--light-border);
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    border-radius: 8px;
    padding: 0px 10px;
}

.search-container input {
    border: none;
    box-shadow: none;
}

#message-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.message {
    padding: 16px 22px;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    min-width: 240px;
    max-width: 320px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-weight: 500;
}

.message.success {
    background-color: #10b981;
}

.message.error {
    background-color: #ef4444;
}

#loading,
#loading-secondary {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
}

#popup {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

#popup>div {
    background-color: white;
    border-radius: 12px;
    width: 440px;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#popup>div h2 {
    margin: 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #EAECF0;
    padding: 20px 20px 15px 20px;
}

#popup>div span {
    width: calc(100% - 30px);
    text-align: center;
    font-weight: 800;
    font-family: var(--font-secondary);
}

#popup>div img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

#popup>div form {
    display: flex;
    align-items: start;
    justify-content: start;
    flex-direction: column;
    padding: 20px;
}

#popup>div form label {
    font-size: 14px;
    margin-bottom: 5px;
}

#popup>div form input,
#popup>div form select,
#popup>div form textarea {
    width: calc(100% - 20px);
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
}

#popup>div form textarea {
    height: 150px;
    resize: none;
}

#popup>div form button {
    width: 100%;
    margin-top: 10px;
}

.table {
    margin-top: 25px;
    border: 1px solid var(--light-border);
    border-radius: 12px;
    overflow: hidden;
    background-color: white;
}

.table table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font);
    font-size: 14px;
}

.table table thead {
    background-color: #f9fafb;
}

.table table th,
.table table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.table table th {
    color: #555;
    font-weight: 600;
    font-family: var(--font-secondary);
}

.status-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 13px;
}

.status-badge.active {
    background-color: #EEFDF5;
    color: #27AE60;
}

.row-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    border: 1px solid var(--light-border);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    width: 32px;
    height: 32px;
    padding: 0px;
}

.icon-btn:hover {
    filter: brightness(0.95);
    background-color: white;
}

.icon-btn img {
    width: 16px;
    height: 16px;
}

.icon-btn.danger img {
    filter: invert(38%) sepia(74%) saturate(5372%) hue-rotate(344deg) brightness(94%) contrast(90%);
}

.table-state {
    text-align: center;
    padding: 15px;
    color: var(--light-text);
}

.table-state.error {
    color: #B42318
}

.table-state.loading {
    color: #667085
}

.table-state.empty {
    color: #667085
}

#data-select {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#data-select label {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-secondary);
    color: var(--light-text);
    margin-bottom: 4px;
}

#data-select select {
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    padding: 10px 14px;
    width: 220px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
}

#data-select>div {
    display: flex;
    flex-direction: column;
}

#editor {
    gap: 30px;
    align-items: start;
    margin-top: 15px;
}

#editor>div {
    gap: 5px;
    flex: 1;
}

#editor textarea {
    width: calc(100% - 20px);
    margin-bottom: 15px;
}

#tool-input {
    height: 200px;
}

#prompt-input {
    height: 120px;
}

.input-add {
    border: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: start;
    border: 1px solid var(--light-border);
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    border-radius: 8px;
    padding: 0px 5px;
    width: calc(100% - 20px);
    margin-bottom: 15px;
}

.input-add input {
    border: none;
    box-shadow: none;
    width: 100%;
    margin: 0px !important;
}

.input-add img {
    filter: brightness(0.5);
    height: 14px !important;
    width: 14px !important;
    padding: 10px;
    transform: translateX(5px);
    cursor: pointer;
}

#bottom-nav {
    position: absolute;
    bottom: 0px;
    width: calc(100% - 30px);
    border-top: 1px solid var(--light-border);
    padding: 15px;
    transform: translateX(-30px);
    display: flex;
    justify-content: end;
}

#rate-limits {
    width: 100%;
    gap: 10px;
    margin-top: 10px
}

#rate-limits>div {
    width: 100%;
}

#rate-limits input {
    width: 150px;
}

#editor-save-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#editor-save-btn.disabled:hover {
    background-color: black;
}

#editor-container {
    flex-direction: column;
}

#editor-container,
#table-select,
#new-table-btn {
    display: none !important;
}

.value-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.value-item {
    display: inline-flex;
    align-items: center;
    justify-content: start;
    background: #f3f4f6;
    color: #111;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: default;
}

.value-item img {
    margin-left: 6px;
    width: 14px !important;
    height: 14px !important;
    cursor: pointer;
}

.value-item img:hover {
    opacity: .7;
}

#record-counter {
    align-self: center;
    border: 1px solid var(--light-border);
    padding: 5px 10px;
    font-weight: 400;
    border-radius: 50px;
    margin-left: 15px;
    font-size: 14px;
}

#data-table tr {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#data-table tr:hover {
    background-color: rgb(248, 248, 248);
}

.record-json {
    padding: 30px;
    font-size: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.4;
}

#view-record {
    width: 800px !important;
    max-height: 90%;
    overflow-y: auto;
    overflow-x: hidden;
}

#stats {
    margin-top: 15px;
    gap: 10px;
    width: 100%;
}

#stats>div {
    padding: 20px;
    flex: 1;
}

#stats>div span {
    font-weight: 600;
    font-size: 30px;
    margin-top: 5px;
}

#update-user #button-container {
    width: 100%;
    gap: 10px;
}

.service-option {
    display: none !important;
}

#section-title {
    margin: 20px 0px;
}

#main-content {
    height: 100%;
}

#conversations-contianer {
    height: calc(100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px;
    overflow: hidden;
}

#conversations-contianer>div {
    height: 100%;
}

#conversations-contianer #left {
    border-right: 1px solid var(--light-border);
    width: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}

#conversations-contianer #left .active {
    background-color: rgb(248, 248, 248);
}

#conversations-contianer #left>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 30px);
    padding: 15px;
    border-bottom: 1px solid var(--light-border);
    gap: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#conversations-contianer #left>div:hover {
    background-color: rgb(251, 251, 251);
}

#conversations-contianer #left>div>div {
    display: flex;
    align-items: start;
    justify-content: start;
    flex-direction: column;
}

#conversations-contianer #left img {
    height: 40px;
    width: 40px;
    border-radius: 50px;
}

#conversations-contianer #left p {
    font-size: 14px;
    color: var(--light-text);
}

#conversations-contianer #left span {
    background-color: black;
    border-radius: 50px;
    width: 15px;
    height: 15px;
}

#conversations-contianer #right {
    width: calc(100% - 250px);
}

#conversations-contianer #right #top {
    padding: 15px;
    width: calc(100% - 30px);
    border-bottom: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#conversations-contianer #right #top h4 {
    font-weight: 500;
    margin: 0px;
}

#chat-messages {
    padding: 15px;
    width: calc(100% - 15px);
    height: calc(100% - 150px);
    display: flex;
    align-items: start;
    justify-content: start;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

#chat-messages>div {
    width: calc(100% - 30px);
    display: flex;
    align-items: center;
    padding: 3px 0px;
}

#chat-messages #user-message {
    justify-content: end;
}

#chat-messages a {
    background-color: rgb(250, 250, 250);
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 70%;
}

#chat-message #other-message {
    justify-content: start;
}

#conversations-contianer #input {
    padding: 15px;
    width: calc(100% - 30px);
}

#message-input {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--light-border);
    box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
    border-radius: 50px;
}

#message-input input {
    border: none;
    width: calc(100% - 40px);
    background-color: rgba(0, 0, 0, 0);
    padding-left: 15px;
}

#message-input img {
    height: 16px;
    width: 16px;
    filter: invert(1);
}

#message-input #send-btn {
    border-radius: 50px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    margin-right: 10px;
}

#sort-data,
#filter-data {
    width: 500px !important;
}

#sort-options,
#filter-options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

#sort-options label,
#filter-options label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0px;
    border-bottom: 1px solid var(--light-border);
    cursor: pointer;
}

#sort-options label:last-child,
#filter-options label:last-child {
    border-bottom: none;
}

#sort-form,
#filter-form {
    padding-top: 5px !important;
}

#sort-options input,
#filter-options input {
    border: none !important;
    width: unset !important;
}

#sort-options span,
#filter-options span {
    text-align: left !important;
}

.conversation-item.unreplied {
    background: white;
    border-left: 3px solid black;
}

.conversation-item.unreplied a {
    font-weight: 600;
}

#editor-pause-btn {
    margin-right: 10px;
}