@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap");
/*@import url("https://fonts.googleapis.com/css2?family=Mona+Sans:ital,wght@0,200..900;1,200..900&display=swap");*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /*--bg-color: #fcfcfc;*/
    --bg-color: #fcfbfe;
    --bg-sec-color: #fcfcfc;
    /*--surface-color: #191919;*/
    --surface-color: #000000;
    /*--accent-color: #4e4c7b;*/
    /*--accent-color: #38366b;*/
    /*midnight purple*/
    /*--accent-color: #2e1a47;*/
    /*pulm*/
    /*--accent-color: #381932;*/
    /*violet night*/
    /*--accent-color: #2d1c42;*/
    /*pantone*/
    /*--accent-color: #1f1539;*/
    /*velvet grape*/
    --accent-color: #36255c;
    --nav-item-active-bg: #e9e8ee;
    /* all about text */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    /* all about line height */
    --leading-tight: 1.3;
    --leading-normal: 1.45;
    --leading-relaxed: 1.55;
    /* all about fonts */
    /*--font-ui: "Satoshi-Variable", "Inter", sans-serif, system-ui;
    --font-data: "Inter", sans-serif, system-ui;*/
    --font-ui: "Manrope", sans-serif, system-ui;
    --font-data: "Manrope", sans-serif, system-ui;
    /* all abour borders */
    --border-color: #e5e7eb;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 16px;
}

.text-xs {
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
}

.text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.text-base {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--surface-color);
    font-weight: 400;
    font-size: var(--text-sm);
    font-optical-sizing: auto;
    font-family: "Manrope", sans-serif;
    line-height: var(--leading-normal);
    display: flex;
}

.sb {
    padding: 8px;
    width: 19rem;
    height: 100dvh;
    transition: width 0.25s ease;
}

@media (max-width: 768px) {
    .sb {
        padding: 0px;
        position: fixed;
        top: 0;
        left: -100%;
        width: 18rem;
        height: 100dvh;

        z-index: 70;

        transition: left 0.25s ease;
    }

    .sb.open {
        left: 0;
    }
}

.sb-backdrop {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    z-index: 60;
}

.sb.collapsed {
    width: fit-content;
}

.sb.collapsed span {
    display: none;
}

.sb-nav {
    padding: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 4px;
    background-color: var(--bg-sec-color);
    border: 1px var(--border-color) solid;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .sb-nav {
        padding: 16px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 4px;
        /*background-color: #fafafa;*/
        background-color: #fcfcfc;
        border-radius: 0px;
        border-right: 1px var(--border-color) solid;
    }
}

.sb-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-x: visible;
    overflow-y: auto;
}

.sb-header,
.sb-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.sb-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 500;
}

.sb.collapsed .sb-nav-item {
    padding: 6px;
    justify-content: center;
}

.sb-nav-item.is-active {
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-weight: 600;
}

.sb-nav-item.is-active:hover {
    background-color: var(--accent-color);
}

.sb-nav-item.is-active::before {
    content: "";
    position: absolute;
    right: 6px; /* adjust based on your padding */
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #22c55e; /* green */
    border-radius: 50%;
}

.sb.collapsed .sb-nav-item.is-active::before {
    top: 6px;
    right: 4px;
}

/*.sb.collapsed .sb-nav-item:hover::after {
    content: attr(data-label);

    position: fixed;

    margin-left: 12px;

    background: var(--accent-color);
    color: #fff;

    padding: 4px 8px;
    border-radius: var(--radius-sm);

    white-space: nowrap;

    opacity: 1;
    pointer-events: none;
    transition: opacity 0.15s ease;

    z-index: 9999;
}*/

.sb.collapsed .sb-nav-item:hover::after {
    content: attr(data-label);
    position: fixed;
    z-index: 999;
    /*left: 100%;*/
    left: calc(var(--sb-width, 3.4rem) + 12px);
    background: var(--accent-color);
    color: #fff;
    padding: 4px 8px;
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    align-items: center;
}

.sb-nav-item:hover {
    background-color: var(--nav-item-active-bg);
    cursor: pointer;
}

.sb-nav-group-label {
    /*padding: 4px 8px;*/
    padding: 8px 8px 4px;
    /*text-transform: uppercase;*/
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
    opacity: 0.7;
}

.sb.collapsed .sb-nav-group-label {
    display: none;
}

.sb-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn {
    padding: 6px 16px;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-sec-color);
    border: 1px var(--border-color) solid;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn.btn-accent {
    color: #fafafa;
    background-color: var(--accent-color);
    border: none;
    box-shadow: none;
}

.btn.btn.btn-accent:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: none;
}

.btn:hover {
    background-color: var(--nav-item-active-bg);
    box-shadow: none;
}

.btn:disabled {
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.inp-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.label-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.label {
    opacity: 0.7;
    font-weight: 600;
    padding: 0px 4px;
}

.inp {
    outline: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    background-color: var(--bg-sec-color);
    /*font-style: var(--font-data);*/
}

.inp::placeholder {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.inp:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.inp:focus {
    outline: none;
    border-color: #aaaaab;
    box-shadow: 0 0 0 2px #e9e8ee; /* ring */
}

.required-indicator {
    color: #8c2e2e;
    opacity: 1;
}

.modal-outer-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    /*background-color: rgb(255 255 255 / 10%);
    backdrop-filter: blur(2px); /* key effect */
    /*-webkit-backdrop-filter: blur(2px); */

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-container {
    max-height: 85dvh;
    max-width: calc(100% * 11 / 12); /* optional alternative */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*background-color: var(--bg-color);*/
    background-color: var(--bg-sec-color);
    border: 1px var(--border-color) solid;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
}

@media (max-width: 768px) {
    .modal-container {
        min-width: 100%;
        min-height: 100dvh;
        border: none;
        border-radius: 0px;
    }
}

.modal-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px var(--border-color) solid;
}

.modal-label {
    font-weight: 600;
}

.modal-btn-close {
    margin-left: auto;
    display: inline-flex;
    padding: 0px;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);

    justify-content: center;
    align-items: center;

    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.modal-btn-close:hover {
    color: #fafafa;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: none;
}

.modal-body {
    padding: 4px 24px 16px;
    overflow-y: auto;
    width: 100%;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 8px;
    background-color: #fafafa;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    border-bottom: 1px var(--border-color) solid;
}

.navbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 500;
}

.navbar-item:hover {
    background-color: var(--nav-item-active-bg);
    cursor: pointer;
}

.navbar-left-section,
.navbar-center-section,
.navbar-right-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Layout distribution */
.navbar-left-section {
    flex: 1;
}

.navbar-center-section {
    flex: 1;
    justify-content: center;
}

.navbar-right-section {
    flex: 1;
    justify-content: flex-end;
}

.table-container {
    background-color: var(--bg-sec-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    overflow-y: hidden;
}

table {
    width: 100%;
    min-width: max-content;
    height: fit-content;
    border-collapse: collapse;
}

table tbody tr {
    font-family: var(--font-data);
}

tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

thead {
    position: sticky;
    z-index: 1;
    background-color: var(--accent-color);
    color: var(--bg-color);
}

thead tr {
    border-bottom: 1px solid var(--border-color);
}

.table-container th {
    padding: 6px 8px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: left;
}
td {
    padding: 8px;
}

tbody tr:hover {
    background-color: #f7f7f9;
}

.action-view {
    color: #2563eb; /* Blue */
}
.action-edit {
    color: #f59e0b; /* Amber */
}
.action-delete {
    color: #dc2626; /* Red */
}

.notification {
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-sec-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    min-width: 250px;

    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
}

.notification-wrapper {
    position: relative;
}

/* show stack only if 2+ */
.notifications:has(.notification-wrapper:nth-child(2))
    .notification-wrapper::before,
.notifications:has(.notification-wrapper:nth-child(3))
    .notification-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: var(--radius-md);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

/* depth */
.notification-wrapper::before {
    transform: translateY(6px) scale(0.94);
    opacity: 0.8;
    z-index: 0;
}

.notification-wrapper::after {
    transform: translateY(12px) scale(0.88);
    opacity: 0.7;
    z-index: -1;
}

/* hide extra */
.notifications .notification-wrapper:nth-child(n + 2) {
    display: none;
}

/* expand */
.notifications:hover .notification-wrapper {
    display: block !important;
}

.notifications:hover .notification-wrapper::before,
.notifications:hover .notification-wrapper::after {
    display: none;
}

.notification {
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-icon {
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
}

/* Keep icon fully opaque */
.info {
    color: #2563eb;
}

.success {
    color: #0fba81;
}

.fail {
    color: #dc2626;
}

.warn {
    color: #f59e0b;
}

/* Background with transparency */
.notification-icon.info {
    background-color: rgba(37, 99, 235, 0.15);
}

.notification-icon.success {
    background-color: rgba(15, 186, 129, 0.15);
}

.notification-icon.fail {
    background-color: rgba(220, 38, 38, 0.15);
}

.notification-icon.warn {
    background-color: rgba(245, 158, 11, 0.15);
}

.notification-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

.notification-message span:last-child {
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
    opacity: 0.7;
}

.notification-close {
    margin-left: auto;
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
}

.notification-close:hover {
    background-color: var(--accent-color);
    color: #fafafa;
    cursor: pointer;
}

/* DROPDOWN SECTION */
.dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown .dropdown-btn {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    padding: 4px 8px;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    background-color: var(--bg-sec-color);
}

.dropdown-btn:focus {
    outline: none;
    border-color: #aaaaab;
    box-shadow: 0 0 0 2px #dbdbdc; /* ring */
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;

    width: 100%;
    max-height: 120px;
    z-index: 1000;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    display: none;
    flex-direction: column;
    background-color: var(--bg-sec-color);
    gap: 2px;
    outline: none;
    border-color: #aaaaab;
    box-shadow: 0 0 0 2px #e9e8ee; /* ring */
}

.dropdown .dropdown-btn:disabled {
    /*cursor: ;*/
    color: #aaaaab;
}

.dropdown-panel.open {
    display: flex !important;
}

.dropdown-panel-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5px 6px;
    border-radius: var(--radius-sm);
}

.dropdown-panel-btn .selected-container {
    visibility: hidden;
}

.selected-container.selected {
    visibility: visible;
}

.dropdown-btn-label-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-panel .dropdown-panel-btn:hover {
    display: flex;
    background-color: var(--nav-item-active-bg);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
    justify-content: space-between;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.pagination-route {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn-action {
    height: 26px;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pagination-btn-number {
    height: 26px;
    width: 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.pagination-btn-number:hover {
    background-color: var(--nav-item-active-bg);
}

.pagination-btn-action:hover {
    background-color: var(--nav-item-active-bg);
    border: 1px solid var(--nav-item-active-bg);
}

.pagination-btn-number.active {
    color: var(--bg-color);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.pagination-total-count {
    font-weight: 600;
}

/* TABS */
.tabs-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    min-height: 0;
}

.tabs-tabs {
    display: flex;
    border-bottom: 1.5px solid var(--border-color);
}

.tabs-tabs-btn {
    padding: 3px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-weight: 600;
    /*border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);*/
}

.tabs-tabs-btn span {
    opacity: 0.7;
}

.tabs-tabs-btn:hover {
    color: var(--accent-color);
}

.tabs-tabs-btn span:hover {
    opacity: 1;
    color: var(--accent-color);
}

.tabs-tabs-btn.active {
    margin-bottom: -1.5px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    /*background-color: var(--nav-item-active-bg);*/
}

.tabs-tabs-btn.active span {
    opacity: 1;
}

.tabs-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}
