@font-face {
    font-family: primary-font;
    src: url("../font/Sahel.ttf");
}
@font-face {
    font-family: primary-bold;
    src: url("../font/Sahelbold.ttf");
}

:root {
    --primary: #0ea5e9;
    --border: #0369a1;
    --white: #f4f4f5;
    --s-white: #e4e4e7;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --dark: #083344;
    --gray: #a8a29e;
}
* {
    padding: 0;
    margin: 0;
    font-family: primary-font;
    color: var(--white);
}
h1 {
    font-family: primary-bold;
    font-size: 32px;
}
body {
    background-image: url(../img/background.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    overflow-x: hidden;
    direction: rtl;
    background-size: 200% 200%;
    /* animation: gradient 30s ease-in-out infinite; */
}

.dd {
    /* background-image: url(../img/background.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    overflow-x: hidden;
    direction: rtl;
    background-size: 200% 200%;
    animation: gradient 30s ease-in-out infinite; */
}

button {
    outline: none;
}

#blur-background {
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(70px);
    -webkit-backdrop-filter: blur(70px);
    overflow-y: hidden;
    position: fixed;
    z-index: -1;
}

#root {
    margin: auto;
    width: calc(100vw - 40px);
    height: calc(100vh - 20px);
    display: grid;
    grid-template-columns: 300px auto;
    grid-template-rows: 90px calc(100% - 110px);
    grid-template-areas:
        "navbar navbar"
        "sidebar lists"
        "sidebar lists";
    gap: 20px;
}

.settings {
    position: relative;
    grid-area: lists;
    border-radius: 16px;
    display: grid;
    max-height: 100%;
    grid-template-columns: 100%;
    grid-template-rows: 70px calc(100% - 70px);
    grid-template-areas:
        "tab"
        "openedTab";
}
.settings .list {
    height: 100%;
}

.tab {
    grid-area: tab;
    height: 60px;
}

.openedTab {
    grid-area: openedTab;
    display: "grid !important";
    width: "100%";
}

.y-scroll {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.rgb-border {
    border: 1px solid transparent;
    background-image: linear-gradient(#000, #000), linear-gradient(120deg, #f09 0%, #0ff 50%, #9f0 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 200% 100%;
    animation: gradient 1s ease infinite;
}
.bg-success {
    background-color: var(--success);
}
.bg-danger {
    background-color: var(--danger);
}
.bg-warning {
    background-color: var(--warning);
}
.bg-blur-border {
    background-color: var(--border);
    padding: 0 10px;
    border-radius: 4px;
}
.bg-blur-success {
    background-color: var(--success);
    padding: 0 10px;
    border-radius: 4px;
}
.bg-blur-danger {
    background-color: var(--danger);
    padding: 0 10px;
    border-radius: 4px;
}
.bg-blur-warning {
    background-color: var(--warning);
    padding: 0 10px;
    border-radius: 4px;
}
.text-success {
    color: var(--success);
}
.text-danger {
    color: var(--danger);
}
.text-warning {
    color: var(--warning);
}
.checkbox-holder {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}
input[type="checkbox"] {
    display: flex;
    width: 20px;
    height: 20px;
}
.navbar {
    width: calc(100% - 20px);
    margin-top: 20px;
    grid-area: navbar;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
}

.socket-status-container {
    display: flex;
    align-items: center;
    margin: 0 20px;
}
.nav-gradient {
    position: fixed;
    width: 100vw;
    height: 50px;
    z-index: -2;
    left: 0;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    backgrounwd-size: 400% 400%;
    animation: gradient 5s ease infinite;
}
.nav-gradient .gradient-brightness {
    width: 100%;
    height: 100%;
    background-color: #08334420;
}
.logo-bar {
    height: 50px;
    display: flex;
    gap: 20px;
}
.logo-bar__img {
    height: 50px;
}
.logo-bar__name {
    color: var(--s-white);
}
.user-bar {
    width: 300px;
    height: 50px;
    display: grid;
    grid-template-columns: auto 70px;
    grid-template-rows: 25px 25px;
    grid-template-areas:
        "user-bar__name user-bar__img"
        "user-bar__cash user-bar__img";
    justify-items: end;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.user-bar__name {
    color: var(--white);
    grid-area: user-bar__name;
}
.user-bar__img {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    object-fit: cover;
    grid-area: user-bar__img;
}
.user-bar__arrow {
    width: 16px;
    height: 16px;
    grid-area: user-bar__arrow;
}
.user-bar__cash {
    color: var(--s-white);
    grid-area: user-bar__cash;
    display: flex;

    gap: 7px;
}
.user-bar__cash--icon {
    width: 20px;
    height: 20px;
}
.user-bar__user-menu {
    position: absolute;
    width: calc(100% - 40px);
    padding: 15px;
    display: none;
    gap: 10px;
    flex-direction: column;
    top: 70px;
    left: 0;
    border-radius: 8px;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    z-index: 10;
}
.user-menu__icon {
    width: 20px;
    height: 20px;
}
.user-menu__item {
    padding: 0 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    height: 35px;
    border-radius: 6px;
    transition: all ease 0.4s;
}
.user-menu__item:hover {
    background-color: var(--primary);
    padding: 0 25px;
}
.user-menu__item.exit:hover {
    background-color: var(--danger);
}
.sidebar {
    width: 100%;
    grid-area: sidebar;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 260px;
    justify-content: center;
    border: 1px solid var(--border);
}
.sidebar-section {
    margin-top: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-section:last-child {
    border-bottom: unset;
}
.sidebar-section__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-section__title {
    color: var(--s-white);
}
.sidebar-section__item {
    cursor: pointer;
    display: flex;
    gap: 20px;
    align-items: center;
    height: 35px;
    padding-right: 20px;
    transition: all ease 0.4s;
    border-radius: 6px;
}
.sidebar-section__item:hover {
    background-color: var(--border);
    padding-right: 30px;
}
.sidebar-section__item:hover.sidebar-section__item--success {
    background-color: var(--success);
    padding-right: 30px;
}
.sidebar-section__item:hover.sidebar-section__item--danger {
    background-color: var(--danger);
    padding-right: 30px;
}
.sidebar-section__item:hover.sidebar-section__item--warning {
    background-color: var(--warning);
    padding-right: 30px;
}
.sidebar-section__item.active {
    background-color: var(--border);
    padding-right: 30px;
}
.sidebar-section__icon {
    width: 20px;
    height: 20px;
}
.search-bar {
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 100%;
    height: 30px;
    display: flex;
}
.search-bar__icon {
    padding: 7px;
    width: 16px;
    height: 16px;
}
.search-bar__input {
    width: calc(100% - 32px);
    height: 30px;
    border: none;
    outline: none;
    background-color: unset;
}
.check-action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 280px;
    padding: 0 10px;
    position: absolute;
    border-radius: 6px;
    transition: 0.4s all ease;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border: 1px solid var(--border);
    z-index: 10;
}
.check-action__quiz {
    padding: 10px;
}
.check-action__actions {
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}
.check-action__progress {
    width: 100%;
    height: 10px;
}
.check-action__progress .progress {
    display: flex;
    width: 0;
    height: 100%;
    transition: 5s ease-in all;
    border-radius: 4px;
    margin-right: -10px;
}
.check-action__button {
    min-width: 75px;
    height: 25px;
    background-color: unset;
    border: none;
    border-radius: 4px;
    background-color: var(--gray);
    cursor: pointer;
}
.check-action__button.border {
    background-color: var(--border);
}
.check-action__button.success {
    background-color: var(--success);
}
.check-action__button.danger {
    background-color: var(--danger);
}
.check-action__button.warning {
    background-color: var(--warning);
}
.lists {
    position: relative;
    border: 1px solid var(--border);
    grid-area: lists;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border-radius: 16px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 16px auto 50px 50px;
    z-index: 5;
}
.settings .lists {
    grid-area: setting-list;
    height: calc(100% - 47px);
}

.list {
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    direction: ltr;
}
.list table {
    margin: 0 auto;
    width: calc(100% - 40px);
    border-collapse: collapse;
    direction: rtl;
}
.list table tr {
    height: 50px;
    gap: 5px;
}
.list table td {
    padding: 5px 10px;
    min-width: 20px;
}
.list-header tr {
    height: 40px !important;
}

.list th {
    text-align: right;
    border-bottom: 1px solid var(--border);
    padding: 5px 10px;
}
.list__icon {
    cursor: pointer;
    height: 30px;
}
.list-control {
    width: calc(100% - 40px);
    height: 50px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.list-control table {
    text-align: right;
}
.list-control td {
    width: 175px;
    text-align: center;
}
.list-control__action {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 5px;
}
.list-control td:first-child {
    width: 60px;
}

.list-control__icon {
    width: 16px;
    height: 16px;
}
.list-control__icon.main {
    width: 30px;
    height: 30px;
}
.list-pages {
    width: calc(100% - 40px);
    height: 50px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.list-pages__numbers {
    display: flex;
    list-style-type: none;
    gap: 10px;
}
.list-pages__num {
    width: 30px;
    height: 30px;
    background-color: unset;
    border: 1px solid var(--white);
    border-radius: 6px;
    color: var(--white);
    transition: all ease 0.4s;
}
.list-pages__num.active {
    background-color: var(--primary);
    border: 1px solid var(--primary);
}
.list-pages__move {
    width: 100px;
    height: 30px;
    background-color: unset;
    border: 1px solid var(--white);
    border-radius: 6px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all ease 0.4s;
}
.list-pages__move:hover,
.list-pages__num:hover {
    border: 1px solid var(--primary);
    background-color: var(--primary);
    gap: 20px;
}

.list-pages__icon {
    width: 20px;
    height: 20px;
}
.blur {
    top: 0;
    left: 0;
    position: fixed;
    z-index: 20;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup {
    position: fixed;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.my-border {
    border-radius: 6px;
    border: 1px solid var(--border);
}

.styled-input {
    padding: 5px;
    display: block;
    width: 100%;
    background-color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--primary);
    outline: unset;
}
.styled-select {
    padding: 5px;
    width: 100%;
    background-color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--primary);
}
.styled-button {
    padding: 5px;
    background-color: var(--primary);
    border-radius: 4px;
    color: var(--white);
    transition: 0.4s all ease;
}
.styled-button:hover {
    background-color: var(--border);
}
.styled-button.border {
    background-color: var(--border);
}
.styled-button.success {
    background-color: var(--success);
}
.styled-button.danger {
    background-color: var(--danger);
}
.styled-button.warning {
    background-color: var(--warning);
}

.check-action__button.warning {
    background-color: var(--warning);
}

.styled-checkbox__container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.styled-checkbox__container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.styled-checkbox__checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 3px;
}
.styled-checkbox__container:hover input ~ .styled-checkbox__checkmark {
    background-color: var(--border);
}
.styled-checkbox__container input:checked ~ .styled-checkbox__checkmark {
    background-color: var(--primary);
}
.styled-checkbox__checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.styled-checkbox__container input:checked ~ .styled-checkbox__checkmark:after {
    display: block;
}
.styled-checkbox__container .styled-checkbox__checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.login-card {
    width: 400px;
    min-height: 500px;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.login-header {
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-items: start;
    text-align: center;
    margin-bottom: 20px;
}

.login-logo {
    width: 80px;
    height: 80px;
    text-align: center;
    margin-bottom: 20px;
    transition: 0.4s all ease;
}

.login-logo:hover {
    transform: scale(1.1);
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--white);
    margin: 0;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.login-input__holder {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 14px;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 5px;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--gray);
    padding: 5px;
    border-radius: 4px;
    transition: 0.2s all ease;
}

.password-toggle:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

.password-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.styled-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.login-button {
    margin-top: 10px;
    position: relative;
    min-height: 48px;
}

.login-button.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.help-text {
    font-size: 12px;
    color: var(--gray);
    margin: 0;
}
/* Old login image styles removed - now using .login-logo */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media screen and (max-height: 743px) {
    .sidebar {
        overflow-y: scroll;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }
}
@media screen and (max-width: 1010px) {
    #root {
        grid-template-columns: 50px auto;
    }
    .sidebar {
        grid-template-columns: 40px;
    }
    .sidebar-section__item-name,
    .sidebar-section__title,
    .search-bar {
        display: none;
    }
    .sidebar-section__item {
        padding-right: 10px;
    }
    .sidebar-section__item:hover {
        background-color: var(--border);
        padding-right: 10px;
    }
    .sidebar-section__item:hover.sidebar-section__item--success,
    .sidebar-section__item:hover.sidebar-section__item--danger,
    .sidebar-section__item:hover.sidebar-section__item--warning,
    .sidebar-section__item.active {
        padding-right: 10px;
    }
}
@media screen and (max-width: 762px) {
    .login-card {
        width: 90vw;
        max-width: 400px;
        padding: 30px 20px;
        min-height: 450px;
    }

    .login-title {
        font-size: 20px;
    }

    .logo-bar__name,
    .list-control__action span,
    .list-pages__move span {
        display: none;
    }
    .list-control__action {
        width: 20px;
        align-items: center;
        justify-content: center;
        height: 20px;
        padding: 3px;
    }
    .list-pages__move {
        width: 40px;
    }
}

.ReactModal__Overlay {
    opacity: 0;
    transform: translateY(-50%);
    transition: all 500ms ease-in-out;
}

.ReactModal__Overlay--after-open {
    opacity: 1;
    transform: translateX(0px);
}

.ReactModal__Overlay--before-close {
    opacity: 0;
    transform: translateY(-50%);
}

.ReactModal__Content {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--border);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Modern Tab Component Styles */
.tab-component {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tab-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0;
    background: transparent;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.tab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    outline: none;
    border-bottom: 2px solid transparent;
    min-height: 60px;
}

.tab-button:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.tab-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    font-weight: 600;
}

.tab-button.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.tab-icon {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-badge {
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.tab-content {
    flex: 1;
    position: relative;
}

.tab-panel {
    width: 100%;
    height: 100%;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

.tab-panel-content {
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.tab-panel-content::-webkit-scrollbar {
    width: 6px;
}

.tab-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.tab-panel-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.tab-panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-navigation::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 50px;
    }

    .tab-panel-content {
        padding: 15px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .tab-button {
        color: #e5e7eb;
    }

    .tab-button:hover {
        color: #60a5fa;
    }

    .tab-button.active {
        color: #60a5fa;
    }
}
