:root {
    --red: #C1554E;
    --grey: #E4E4E4;
    --black: #020027;
    --blue: #222252;
    --white: #ffffff;
    --text: #6b6e73;
    --border: #d6d8d9;
    --yellow: #F6B53B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins Regular';
    color: var(--black);

}

body {
    background-color: var(--grey);
}

@font-face {
    font-family: 'Poppins Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Poppins Regular'), url('./fonts/Poppins-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Poppins Medium';
    font-style: normal;
    font-weight: normal;
    src: local('Poppins Medium'), url('./fonts/Poppins-Medium.woff') format('woff');
}


@font-face {
    font-family: 'Poppins SemiBold';
    font-style: normal;
    font-weight: normal;
    src: local('Poppins SemiBold'), url('./fonts/Poppins-SemiBold.woff') format('woff');
}

p,
a,
span {
    font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins SemiBold';
}

a {
    font-family: 'Poppins Medium';
}

body {
    font-family: Arial, sans-serif;
    background: var(--grey);
    color: var(--text);
}

img {
    width: 100%;
    display: block;
}

small.p-left {
    position: absolute;
    width: max-content;
}

.logo {
    max-width: 220px;
}

main {
    padding: 1rem 2rem;
}

.header-bar {
    padding: 1rem 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.header-bar>* {
    width: 100%;
}

.login-info {
    text-align: left;
}

.btn-logout:hover {
    background-color: var(--red);
}

.header-bar a {
    text-decoration: none;
}

.app-title {
    background: var(--red);
    color: var(--white);
    padding: 12px;
    font-weight: bold;
    font-size: 18px;
}

#datetime {
    min-width: 150px;
    display: inline-block;
}

.main-nav ul {
    list-style: none;
}

.main-nav>ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 1rem 0 .5rem;
    border-top: 1px solid var(--border);
}

.main-nav>ul>li {
    position: relative;
}

.main-nav>ul>li.active a {
    border-bottom: 1px solid var(--blue);
}

.main-nav {
    padding: 0 2rem;
}

.main-nav>ul>li>a {
    display: block;
    text-decoration: none;
    padding: .2rem 0;
}



.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: max-content;
    z-index: 1000;
    opacity: 1;
    visibility: hidden;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
}

.submenu li {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    cursor: pointer;
}

.submenu li:hover,
.submenu li.active {
    background: var(--hover-bg);
}

.main-nav li.show>.submenu {
    opacity: 1;
    visibility: visible;
    display: block;
}

.submenu li:hover {
    background: #e4e4e485;
}

.tab-content-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;

}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


.page-wrapper {
    background: var(--white);
}

.page-header {
    background: var(--blue);
    color: var(--white);
    text-align: center;
    padding: .5rem .5rem .5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    min-height: 52.8px;
    gap: 1rem;
    justify-content: space-between;
}

.page-header small,
.page-header h3 {
    color: var(--white);
}

.buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem auto 0;
    justify-content: end;
}

.page-header small {
    text-align: left;
}

.action-s {
    text-align: right;
}

.btn-s {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 1rem;
    width: max-content;
    border-radius: 4px;
    color: var(--white);
    transition: all 200ms ease-in-out;
    border: none;
    font-family: 'Poppins Medium';
    font-size: 14px;
    cursor: pointer;
}

.action-links a:hover {
    color: var(--red);
    text-decoration: underline;
}

.btn-s.red-s {
    background: var(--red);
}

.btn-s.black-s {
    background: var(--blue);
}

.btn-s.black-s:hover {
    background: var(--red);
}

.btn-s.red-s:hover {
    background: var(--blue);
}

.page-header .btn-s:hover {
    background: var(--white);
    color: var(--blue);
}

.header-bar>span {
    text-align: right;
}

.page-header>* {
    width: 100%;
}

.top-actions {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.top-actions button {
    background: var(--blue-light);
    border: none;
    padding: 6px 12px;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
}

.search-bar {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}



.table-filter {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    row-gap: .8rem;
    align-items: center;
}

.table-filter input,
.table-filter select,
.table-filter button {
    margin-right: 2rem;
    margin-left: .2rem;
}

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

table th,
table td {
    border: 1px solid var(--border);
    padding: .5rem;
    text-align: left;
}

table th {
    background: var(--gray);
    font-weight: bold;
}

.action-links a {
    margin: 0 4px;
    color: var(--link);
    text-decoration: none;
}

.pagination {
    text-align: center;
    padding: 10px;
}

.pagination a {
    margin: 0 4px;
    text-decoration: none;
    color: var(--link);
}

textarea,
input,
select,
input {
    padding: .4rem .6rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    outline: none;
}

.not-found {
    padding: 2rem;
    text-align: center;
    font-weight: 600;
}

.table-filter select {
    cursor: pointer;
}

.search-bar input {
    padding-left: 36px;
}

.search-wrap {
    position: relative;
}

.search-wrap:after {
    position: absolute;
    left: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    content: "";
    background-image: url('data:image/svg+xml,<svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><title/><path fill="%236b6e73" d="M456.69,421.39,362.6,327.3a173.81,173.81,0,0,0,34.84-104.58C397.44,126.38,319.06,48,222.72,48S48,126.38,48,222.72s78.38,174.72,174.72,174.72A173.81,173.81,0,0,0,327.3,362.6l94.09,94.09a25,25,0,0,0,35.3-35.3ZM97.92,222.72a124.8,124.8,0,1,1,124.8,124.8A124.95,124.95,0,0,1,97.92,222.72Z"/></svg>');
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
    opacity: .5;
}

button.btn-s.red-s-black:hover {
    background: var(--black);
}

.formula-table {
    background: var(--yellow);
}

.markups {
    display: flex;
    padding: 1rem 0;
    gap: 1rem;
}


.markups>* {
    width: 50%;
}

.markups>textarea:first-child {
    width: 80% !important;
}

.search-agent textarea {
    width: 100%;
    min-height: 200px;
    display: block;
}

.search-agent .search-wrap,
.search-agent .search-wrap input {
    width: 100%;
}

.search-agent .search-bar {
    padding-top: 0;
}

table.tb-mr,
table.markup-dates {

    margin: 1rem 0;
}

.markup-dates tbody {
    width: 100%;

}

.d-flex {
    display: flex;
    gap: 1rem;
}

.item-center {
    align-items: center;
}

.select-markups {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
}

.select-markups input,
.select-markups textarea {
    width: 100%;
}

.select-markups label {
    min-width: 262px;
}

.j-center {
    justify-content: center;
}

.mt {
    margin-top: 1rem;
}

input[type="checkbox"] {
    accent-color: var(--black);
    width: 16px;
    height: 16px;
    vertical-align: middle;
    cursor: pointer;
}

input[type="checkbox"]+label {
    cursor: pointer;
}

.table-responsive {
    overflow: auto;
}