*,
*::before,
*::after {
    box-sizing: border-box;
}

html.dark .main-page_checkbox+label::before,
html.dark div.command.additional-option input+label::before {
    border-color: #4b5563;
    background-color: #111827;
}

*,
html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
}

body {
    background-color: white;
}

html.dark body {
    background-color: #0f172a;
    color: #f9fafb;
}

html.dark a {
    color: #93c5fd;
}

html.dark a:hover {
    color: #bfdbfe;
}

html.dark .card {
    background-color: #1f2937;
    border-color: #334155;
    color: #f9fafb;
}

html.dark .card-header,
html.dark .card-footer {
    background-color: #111827;
    border-color: #334155;
    color: #f9fafb;
}

html.dark .card-body {
    color: #f3f4f6;
}

html.dark .card-body dt {
    color: #e5e7eb;
}

html.dark .card-body dd {
    color: #cbd5f5;
}

h4,
h5 {
    font-size: 16px;
}

/* --------------------------------------------------------- */
/* --------------------------------------------------------- */
/* Main-Page */

.main-page_container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    width: 100vw;
    height: 100vh;
}

html.dark .main-page_container {
    background-color: #0f172a;
    color: #f9fafb;
}

.main-page_logo {
    margin-left: 40px;
    margin-right: 40px;
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.main-page_logo img {
    height: 28px;
}

.main-page_auth-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-page_auth-form_container {
    width: 245px;
}

.main-page_h1 {
    font-size: 18px;
    color: #2F2F2F;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

html.dark .main-page_h1 {
    color: #f3f4f6;
}

.main-page_email-container {
    position: relative;
}

.img-person {
    position: absolute;
    top: 7px;
    left: 3px;
    width: 14px;
}

.main-page_email:focus+.img-person {
    filter: brightness(0);
}

.main-page_email {
    font-family: 'Roboto';
    outline: none;
    border: none;
    border-bottom: solid 1px #E1E1E1;
    width: 100%;
    height: 30px;
    margin-bottom: 25px;
    padding-left: 25px;
}

.main-page_email::placeholder {
    color: #C9C9C9;
}

html.dark .main-page_email,
html.dark .main-page_password {
    background-color: transparent;
    border-bottom-color: #4b5563;
    color: #f9fafb;
}

html.dark .main-page_email::placeholder,
html.dark .main-page_password::placeholder {
    color: #9ca3af;
}

.main-page_password-container {
    position: relative;
}

.img-password {
    position: absolute;
    top: 5px;
    left: 4px;
    width: 14px;
}

.main-page_password:focus+.img-password {
    filter: brightness(0);
}

.main-page_password {
    outline: none;
    border: none;
    border-bottom: solid 1px #E1E1E1;
    width: 100%;
    height: 30px;
    margin-bottom: 25px;
    padding-left: 25px;
}

.main-page_password::placeholder {
    color: #C9C9C9;
}

.main-page_remember-me {
    margin-bottom: 25px;
}

html.dark .main-page_checkbox+label,
html.dark div.command.additional-option input+label {
    color: #e5e7eb;
}

.main-page_checkbox,
div.command.additional-option input {
    outline: none;
}


/* ********************************************************* */
/* CHECKBOX */

.main-page_checkbox,
div.command.additional-option input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.main-page_checkbox+label,
div.command.additional-option input+label {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    user-select: none;
    padding: 0 0;
    color: #000;
}

.main-page_checkbox+label::before,
div.command.additional-option input+label::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    flex-grow: 0;
    border: 1px solid #E1E1E1;
    border-radius: 0.25em;
    margin-right: 0.5em;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;

}

.main-page_checkbox:checked+label::before,
div.command.additional-option input:checked+label::before {
    content: '';
    background: url('img/check.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90% 90%;
    transition: background 0.1s ease;
}

/* ********************************************************* */

.main-page_submit {
    border: none;
    font-size: 12px;
    padding: 12px 100px;
    color: white;
    background-color: #2F2F2F;
    border-radius: 35px;
    cursor: pointer;
    width: 100%;
}

html.dark .main-page_submit {
    background-color: #2563eb;
    border: 1px solid #3b82f6;
}

.main-page_submit:focus {
    outline: none;
}

.main-page_copyright {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: #6F6F6F;
    padding-right: 40px;
    padding-bottom: 15px;
}







/* --------------------------------------------------------- */
/* --------------------------------------------------------- */
/* Projects List - For Static Page */

.container {
    /* min-width: 1024px; */
    min-width: 1280px;
    /*max-width: 1600px;*/
    padding: 0;
    margin: 0 auto;
    height: 100%;
    position: relative;
}

/* Header */
.header {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: flex-start;
}

.header-left {
    background-color: white;
    width: 17%;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
}

.header-left a {
    display: block;
    color: black;
    font-size: 16px;
    width: 100%;
    height: 100%;
}

.logo {
    margin: auto 40px;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #E1E1E1;
}

.logo img {
    height: 28px;
}

.header-right {
    background-color: #F4F4F4;
    width: 83%;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
}

.header-right-container {
    margin: auto 40px;
    height: 100%;
    width: 100%;
    border-bottom: 1px solid #E1E1E1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.sheet {
    display: inline-block;
    margin-right: 25px;
    margin-left: 25px;
    cursor: pointer;
    font-size: 15px;
}

.sheets a {
    text-decoration: none;
    color: black;
    font-size: 16px;
}


.logout-link {
    margin-left: 50px;
}

.logout-link:hover {
    font-weight: bold;
}

.user-icon {
    padding: 7px;
    width: 35px;
    height: 35px;
    background-color: #C4C4C4;
    border-radius: 50%;
    text-align: center;
    vertical-align: middle;
    line-height: 1.01em;
    margin-left: 3px;
}

.main {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    background-color: white;
}

.left-block {
    width: 17%;
    height: 400px;
    background-color: white;

    padding-left: 40px;
    padding-right: 40px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.border-bottom-for-block {
    padding-top: 35px;
    border-bottom: 1px solid #E1E1E1;
}

.right-block {
    width: 83%;
    min-height: 100vh;
    background-color: #F4F4F4;
}

/* ********************************************************* */

.project-list-container {
    margin: 50px 40px;
}

.projects-list-header {
    font-size: 18px;
    margin-bottom: 50px;
}

.project-link {
    display: inline-block;
    /* margin-left: 40px; */
    /* margin-top: 20px; */
    text-decoration: none !important;
    color: black !important;
}
/* Dark override: force readable link color in dark theme */
html.dark .project-link {
    color: #93c5fd !important;
}
html.dark .project-link:hover {
    color: #bfdbfe !important;
}

html.dark .navbar {
    background-color: #0b1120 !important;
    border-bottom: 1px solid #1f2937;
}

html.dark .navbar .navbar-brand,
html.dark .navbar .navbar-brand img,
html.dark .navbar .nav-link,
html.dark .navbar .navbar-text {
    color: #e5e7eb !important;
}

html.dark .navbar .nav-link.active,
html.dark .navbar .nav-link:hover {
    color: #93c5fd !important;
}

html.dark .navbar .btn-outline-secondary {
    color: #e5e7eb;
    border-color: #4b5563;
}

html.dark .navbar .btn-outline-secondary:hover {
    color: #0b1120;
    background-color: #93c5fd;
    border-color: #93c5fd;
}

html.dark .container-fluid {
    background-color: #0f172a;
    color: #f9fafb;
}

html.dark .project-list .table {
    background-color: #111827;
    color: #d1d5db;
    border-color: #1f2937;
}

html.dark .project-list .table thead th {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

html.dark .project-list .table tbody tr td {
    border-color: #1f2937;
    background-color: #111827;
}

html.dark .project-list .table tbody tr:hover {
    background-color: #1b2535;
}

html.dark .project-list .table tbody tr:nth-of-type(odd) td {
    background-color: #0f1a2e;
}

html.dark .project-list .table tbody tr td {
    border-color: #1f2937 !important;
}

html.dark .project-list .table tbody tr td .project-name,
html.dark .project-list .table tbody tr td .project-number-in-list {
    color: #e2e8f0;
}

html.dark .project-list .table .badge {
    background-color: #2563eb;
}

html.dark .project-list .input-group-text {
    background-color: #0f172a;
    border-color: #374151;
    color: #9ca3af;
}

html.dark .project-list .form-control {
    background-color: transparent;
    border-color: #374151;
    color: #f9fafb;
}

html.dark .project-list .form-control::placeholder {
    color: #9ca3af;
}

html.dark .project-list .table a {
    color: #93c5fd !important;
}

html.dark .project-list .table a:hover {
    color: #bfdbfe !important;
}

html.dark label,
html.dark .form-label {
    color: #e2e8f0;
}

html.dark .form-control,
html.dark .form-select {
    background-color: #111827;
    border-color: #334155;
    color: #f1f5f9;
}

html.dark .form-control::placeholder,
html.dark .form-select::placeholder {
    color: #9ca3af;
}

html.dark .form-control:focus,
html.dark .form-select:focus {
    background-color: #111827;
    border-color: #60a5fa;
    color: #f8fafc;
    box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25);
}

html.dark .form-control:disabled,
html.dark .form-control[readonly],
html.dark .form-select:disabled,
html.dark .form-select[readonly] {
    background-color: #1f2937;
    border-color: #334155;
    color: #9ca3af;
}

html.dark .form-control[type="file"]::file-selector-button {
    background-color: #1f2937;
    border: 1px solid #334155;
    color: #e2e8f0;
}

html.dark .form-control[type="file"]::file-selector-button:hover {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: #0f172a;
}

html.dark .form-text {
    color: #94a3b8;
}

html.dark .form-check-input {
    background-color: #1f2937;
    border-color: #334155;
}

html.dark .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

html.dark .form-check-label {
    color: #e2e8f0;
}

html.dark .btn-primary {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: #f9fafb;
}

html.dark .btn-primary:hover,
html.dark .btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #2563eb;
    color: #f9fafb;
}

html.dark .btn-danger {
    background-color: #dc2626;
    border-color: #ef4444;
    color: #f9fafb;
}

html.dark .btn-danger:hover,
html.dark .btn-danger:focus {
    background-color: #b91c1c;
    border-color: #dc2626;
}

html.dark .btn-outline-secondary {
    color: #e5e7eb;
    border-color: #4b5563;
}

html.dark .btn-outline-secondary:hover,
html.dark .btn-outline-secondary:focus {
    background-color: #93c5fd;
    border-color: #93c5fd;
    color: #0b1120;
}

html.dark .btn-light,
html.dark .btn-secondary {
    background-color: #1f2937;
    border-color: #334155;
    color: #e5e7eb;
}

html.dark .btn-light:hover,
html.dark .btn-light:focus,
html.dark .btn-secondary:hover,
html.dark .btn-secondary:focus {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

html.dark .alert {
    background-color: #1f2937;
    border-color: #334155;
    color: #e2e8f0;
}

html.dark .alert-info {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #bfdbfe;
}

html.dark .alert-danger {
    background-color: rgba(220, 38, 38, 0.15);
    border-color: #ef4444;
    color: #fecaca;
}

html.dark .operation-status,
html.dark .status {
    background-color: #1f2937;
    border-color: #334155;
    color: #e2e8f0;
}

html.dark .choices__inner {
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
    color: #f1f5f9 !important;
}

html.dark .choices__inner:hover,
html.dark .choices__inner:focus {
    border-color: #60a5fa !important;
}

html.dark .choices__list--dropdown {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
}

html.dark .choices__list--dropdown .choices__item {
    color: #e2e8f0 !important;
}

html.dark .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #1d4ed8 !important;
    color: #f8fafc !important;
}

html.dark .choices[data-type*=select-one] .choices__button {
    border-left: 1px solid #334155 !important;
}

html.dark .choices__placeholder {
    color: #9ca3af !important;
}


html.dark #user-table tr td {
    color: #e2e8f0;
}

.project-name {
    padding-left: 30px;
    font-size: 14px;
}

.project-list .edit-project,
.project-list .delete-project {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.database-editor .scrollable-y {
    max-height: 100vh;
    overflow-y: scroll;
}

.database-editor .scrollable-y {
    max-width: 100vw;
    overflow-x: scroll;
}

.database-editor .sidebar-right {
    padding-left: 0.3%;
}

.fill-height {
    min-height: 100vh;
}

.table-tertiary {
    background-color: rgb(248, 249, 250);
}


.navbar.divided .collapse.navbar-collapse,
.navbar.divided .navbar-toggler {
    margin-left: 30%;
}

.nav-bottom-border,
.header-bottom-border {
    border-bottom: 1px solid #E1E1E1;
}

.navbar.divided hr {
    background-color: #F4F4F4;
    width: 80%;
    margin-top: 1.1rem !important;
    border-top: 1px solid #E1E1E1;
    border-bottom: 1px solid #E1E1E1;
}

.database-editor .editor-wrapper {
    width: 20%;
    min-width: 100px;
    display: inline-block;
}

.database-editor .editor-wrapper .bi {
    cursor: pointer;
    font-size: 12px;
}

.database-editor .editor-wrapper .bi:hover {
    font-weight: bold;
}

.database-editor thead tr {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: rgb(248, 249, 250);
}

.database-editor thead tr th {
    border-bottom: 1px solid black !important;
}

.database-editor th {
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 60px;
    transition: background-color 150ms;
    padding: 16px 8px 16px 22px;
}

.database-editor th:before {
    content: "\f138";
    display: inline-block;
    color: rgba(white, 0.4);
    font-family: "bootstrap-icons";
    transition: transform 300ms, color 300ms;
    position: relative;
    font-size: 18px;
    left: -5px;
    top: 5px;
}

.database-editor th.ascending:before {
    transform: rotate(-90deg);
    /* content: "\f124"; 
    font-family: "bootstrap-icons"; */
    /* color: white; */
}

.database-editor th.descending:before {
    transform: rotate(90deg);
    /* content: "\f145";  */
    /* color: white; */
}

.database-editor .ascending {
    background-color: #d42d2d;
}

.database-editor .descending {
    background-color: #aa0f0f;
}

.custom-header-height {
    height: 60px;
}

.navbar-brand .navbar-logo {
    height: 28px;
}

/* --------------------------------------------------------- */
/* Dark theme support for generic Bootstrap list groups      */
/* Ensures pages with list-group/list-group-item render dark */
html.dark .list-group {
    background-color: transparent;
}

html.dark .list-group-item {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark .list-group-item:hover,
html.dark .list-group-item:focus {
    background-color: #1b2535;
    color: #f1f5f9;
}

html.dark .list-group-item.active {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: #f9fafb;
}

html.dark .list-group-flush > .list-group-item {
    border-color: #1f2937;
}