:root {
    --main-color: #137250;
    --main-highlight-color: #d04906;
    --main-text-color: #475569;
    --main-background-color: #f8f9fb;
    --button-color: #137250;

    --heading-color: #0f513b;
    --muted-color: #64748b;
    --border-color: #dbe3e8;
    --input-background: #ffffff;
    --danger-color: #c93838;
    --success-color: #137250;

    --border-radius-sm: 6px;
    --border-radius: 10px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 2px 8px rgb(15 23 42 / 5%);
    --shadow: 0 12px 32px rgb(15 23 42 / 8%);
    --transition: 160ms ease;

    --admin-header-height: 64px;
    --admin-sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    max-width: 100%;
}

body {
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--main-text-color);
    background: var(--main-background-color);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: var(--main-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--heading-color);
    line-height: 1.3;
}

p {
    margin: 0;
}

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

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

::-webkit-scrollbar-track {
    background: #e2e8f0;
}

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

.admin-card {
    background: #fff;
    border: 1px solid rgb(219 227 232 / 80%);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-control {
    height: 46px;
    padding: 10px 13px;
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    outline: none;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background-color var(--transition);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:hover {
    border-color: #b8c7cf;
}

.form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgb(19 114 80 / 12%);
}

.form-control:disabled {
    color: #94a3b8;
    background: #f1f5f9;
    cursor: not-allowed;
}

.input-group {
    position: relative;
}

.input-group .form-control {
    padding-right: 72px;
}

.input-action {
    position: absolute;
    top: 50%;
    right: 6px;
    min-width: 56px;
    padding: 7px 9px;
    color: var(--main-color);
    background: transparent;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(-50%);
}

.input-action:hover {
    background: rgb(19 114 80 / 8%);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--main-text-color);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--main-color);
    cursor: pointer;
}

button {
    padding: 10px 18px;
    border-radius: var(--border-radius);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition),
        opacity var(--transition);
}

button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.btn-primary {
    color: #fff;
    background: var(--button-color);
    box-shadow: 0 7px 16px rgb(19 114 80 / 20%);
}

.btn-primary:hover {
    background: #0f6244;
    box-shadow: 0 9px 20px rgb(19 114 80 / 26%);
}

.btn-block {
    width: 100%;
}

.btn-loader {
    display: none;
    width: 17px;
    height: 17px;
    margin-left: 9px;
    border: 2px solid rgb(255 255 255 / 35%);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-loading 650ms linear infinite;
}

.btn.is-loading .btn-loader {
    display: inline-block;
}

.form-message {
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 14px;
    line-height: 1.45;
}

.form-message:empty {
    display: none;
}

.form-message.is-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.form-message.is-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    color: var(--muted-color);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 12px;
    line-height: 1.3;
}

.text-muted {
    color: var(--muted-color);
}

@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

.page-sidebar {
    width: 100%;
    padding: 16px 12px;
}

.sidebar-menu,
.sub-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    align-items: center;
    gap: 11px;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

a.menu-link:hover,
.menu-toggle:hover {
    color: var(--main-color);
    background: rgb(19 114 80 / 7%);
    text-decoration: none;
    transform: translateX(2px);
}

.menu-link.active {
    color: #fff;
    background: var(--main-color);
    box-shadow: 0 6px 16px rgb(19 114 80 / 18%);
}

.menu-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.menu-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-arrow {
    margin-left: auto;
    color: #94a3b8;
    font-size: 11px;
    transition: transform .2s ease;
}

.menu-link.active .menu-arrow {
    color: rgb(255 255 255 / 80%);
}

.main-item.open > .menu-toggle .menu-arrow {
    transform: rotate(180deg);
}

.sub-menu {
    position: relative;
    display: none;
    padding: 5px 0 5px 43px;
}

.main-item.open > .sub-menu {
    display: block;
}

.sub-menu::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 6px;
    left: 25px;
    width: 1px;
    background: #dbe3e8;
}

.sub-menu li {
    position: relative;
}

.sub-menu-link {
    display: flex;
    min-height: 38px;
    padding: 8px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    transition: color .16s ease, background-color .16s ease;
}

.sub-menu-link::before {
    content: "";
    position: absolute;
    left: -18px;
    width: 7px;
    height: 7px;
    background: #cbd5e1;
    border: 2px solid #fff;
    border-radius: 50%;
}

.sub-menu-link:hover {
    color: var(--main-color);
    background: rgb(19 114 80 / 6%);
    text-decoration: none;
}

.sub-menu-link.active {
    color: var(--main-color);
    background: rgb(19 114 80 / 10%);
    font-weight: 700;
}

.sub-menu-link.active::before {
    background: var(--main-color);
}

.menu-counter {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--main-highlight-color);
    border-radius: 20px;
    font-size: 11px;
    line-height: 1;
}


.app-body {
    min-height: 100vh;
    background: var(--main-background-color);
}

.app-brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.app-brand:hover {
    text-decoration: none;
}

.app-logo {
    width: 145px;
    max-height: 46px;
    object-fit: contain;
}

.app-heading {
    min-width: 0;
    flex: 1;
}

.app-heading h1 {
    overflow: hidden;
    color: var(--main-color);
    font-size: 21px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-kicker {
    display: block;
    margin-bottom: 1px;
    color: var(--main-highlight-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.current-user {
    display: flex;
    margin-right: 5px;
    flex-direction: column;
    align-items: flex-end;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

.current-user strong {
    max-width: 180px;
    overflow: hidden;
    color: #334155;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    background: #f1f5f9;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.icon-button:hover {
    color: #fff;
    background: var(--main-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.logout-form {
    display: flex;
    margin: 0;
}

.logout-button {
    color: var(--main-highlight-color);
}

.logout-button:hover {
    background: var(--main-highlight-color);
}
.app-body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--main-background-color);
}

/* Header */
.app-header {
    position: fixed;
    z-index: 1300;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: var(--admin-header-height);
    padding: 0 20px;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 3px 14px rgb(15 23 42 / 5%);
}

.header-actions {
    display: flex;
    min-width: 0;
    margin-left: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.current-user {
    display: flex;
    margin-right: 5px;
    flex-direction: column;
    align-items: flex-end;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

.current-user strong {
    max-width: 180px;
    overflow: hidden;
    color: #334155;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-sidebar-account {
    display: none;
}

.sidebar-account {
    padding-top: 14px;
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.sidebar-account-info {
    display: flex;
    padding: 10px;
    align-items: center;
    gap: 10px;
}

.account-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    background: rgb(19 114 80 / 9%);
    border-radius: 50%;
}

.sidebar-account-info > div:last-child {
    min-width: 0;
}

.sidebar-account-info b,
.sidebar-account-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account-info b {
    color: #334155;
    font-size: 14px;
}

.sidebar-account-info span {
    margin-top: 1px;
    color: #64748b;
    font-size: 12px;
}

.sidebar-account-actions {
    display: flex;
    margin-top: 5px;
    flex-direction: column;
    gap: 3px;
}

.sidebar-account-link {
    display: flex;
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    align-items: center;
    gap: 10px;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.sidebar-account-link:hover {
    color: var(--main-color);
    background: rgb(19 114 80 / 7%);
    text-decoration: none;
}

.sidebar-account-link i {
    width: 20px;
    text-align: center;
}

.sidebar-logout-form {
    width: 100%;
    margin: 0;
}

.sidebar-logout-button {
    color: var(--main-highlight-color);
}

.sidebar-logout-button:hover {
    color: #fff;
    background: var(--main-highlight-color);
}

@media (max-width: 900px) {
    .desktop-account-actions {
        display: none;
    }

    .mobile-sidebar-account {
        display: block;
    }

    .page-sidebar {
        display: flex;
        min-height: 100%;
        flex-direction: column;
    }

    .sidebar-menu {
        flex: 1;
    }
}
@media (max-width: 600px) {
    .desktop-account-actions {
        display: none;
    }

    .app-heading {
        flex: 1;
    }
}
/* Sidebar */
.admin-sidebar {
    position: fixed;
    z-index: 1200;
    top: var(--admin-header-height);
    bottom: 0;
    left: 0;
    display: block;
    width: var(--admin-sidebar-width);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    scrollbar-width: thin;
}

.page-sidebar {
    width: 100%;
    min-height: 100%;
    padding: 16px 12px;
}

/* Main */
.admin-main {
    width: auto;
    min-width: 0;
    min-height: 100vh;
    padding-top: var(--admin-header-height);
    margin-left: var(--admin-sidebar-width);
}

.page-content {
    width: 100%;
    min-width: 0;
    padding: 24px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: #334155;
    background: #f1f5f9;
    border: 0;
    border-radius: 9px;
    font-size: 19px;
    cursor: pointer;
}

.mobile-menu-button:hover {
    color: #fff;
    background: var(--main-color);
}

.sidebar-overlay {
    position: fixed;
    z-index: 1150;
    top: var(--admin-header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    visibility: hidden;
    background: rgb(15 23 42 / 48%);
    opacity: 0;
}

/* Mobile */
@media (max-width: 900px) {
    .app-header {
        padding: 0 12px;
        gap: 10px;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .admin-sidebar {
        z-index: 1250;
        width: min(84vw, 300px);
        box-shadow: 12px 0 35px rgb(15 23 42 / 18%);
        transform: translateX(-105%);
        transition: transform .22s ease;
        will-change: transform;
    }

    .sidebar-overlay {
        display: block;
        transition:
            opacity .2s ease,
            visibility .2s ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        visibility: visible;
        opacity: 1;
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .page-content {
        padding: 18px;
    }

    .current-user {
        display: none;
    }

    .app-logo {
        width: 120px;
    }

    .app-heading h1 {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    :root {
        --admin-header-height: 58px;
    }

    .app-header {
        padding: 0 10px;
        gap: 8px;
    }

    .mobile-menu-button {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .app-brand {
        display: none;
    }

    .app-kicker {
        display: none;
    }

    .app-heading h1 {
        font-size: 16px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions .icon-button {
        width: 38px;
        height: 38px;
    }

    .page-content {
        padding: 12px;
    }
}

.list-toolbar {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.common-data-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    background: #fff;
}

.common-data-table th,
.common-data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e8edf2;
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

.common-data-table th {
    color: #334155;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.common-data-table tbody tr {
    transition: background-color .15s ease;
}

/*.common-data-table tbody tr:hover {
    background: #f8fafc;
}*/

.common-data-table tr.status--1 {
    color: #64748b;
    background: #f1f5f9;
}

.common-data-table tr.status-5 {
    background: #ecfdf5;
}

.common-data-table .flag {
    display: inline-block;
    width: 24px;
    height: 16px;
    margin-right: 7px;
    object-fit: cover;
    vertical-align: middle;
    border-radius: 2px;
}
.common-data-table tr.row-warning {
    background: #fff7ed;
}

.common-data-table tr.row-active {
    background: #f0fdf4;
}

.common-data-table tr.row-muted {
    color: #64748b;
    background: #f8fafc;
}

.common-data-table tr.row-disabled {
    color: #64748b;
    background: #f1f5f9;
}
.table-thumbnail {
    width: 110px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.table-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
select {
    height: 36px;
    padding: 5px 9px;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    outline: none;
}

select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgb(19 114 80 / 10%);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    width: 35px;
    min-height: 35px;
    padding: 0;
}

.btn-light {
    color: var(--main-color);
    background: #ecfdf5;
}

.btn-danger {
    color: #b91c1c;
    background: #fef2f2;
}

.btn-danger:hover {
    color: #fff;
    background: #b91c1c;
}

.empty-table {
    padding: 35px !important;
    color: #64748b;
    text-align: center !important;
}

.text-danger {
    color: #dc2626;
}

.data-table-wide {
    min-width: 1450px;
}

.data-table tr.status-0 {
    background: #fff7ed;
}

.data-table tr.status-2 {
    color: #64748b;
    background: #f8fafc;
}

.account-list .acc-item {
    padding: 5px 0;
}

.inline-field {
    display: flex;
    min-width: 230px;
    align-items: center;
    gap: 6px;
}

.inline-field .form-control {
    min-width: 0;
    flex: 1;
}

.inline-field .icon-button {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 13px;
}

.sn-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.sn-loading.show {
    display: block;
}

.sn-loading .loading-bg {
    position: absolute;
    inset: 0;
    background: #fcfcfc;
    opacity: .5;
}

.loading-indicator {
    display: inline-block;
    position: fixed;
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    margin-top: -40px;
    margin-left: -40px;
    z-index: 2000;
}
.loading-indicator.inline {
    position: inherit;
    margin: 0 auto;
    display: block;
}
.loading-indicator:after {
    content: " ";
    display: block;
    border-radius: 50%;
    width: 0;
    height: 0;
    margin: 8px;
    box-sizing: border-box;
    border: 32px solid var(--main-color);
    border-color: var(--main-color) transparent var(--main-color) transparent;
    animation: loading-indicator 1.2s infinite;
}
@keyframes loading-indicator {
    0% {
        transform: rotate(0);
        animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
    }
    50% {
        transform: rotate(900deg);
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    100% {
        transform: rotate(1800deg);
    }
}
#notifications {
    position: fixed;
    top: 15%;
    right: 0;
    z-index: 101;
    color: #FFF;
    font-weight: bold;
}
.notification-container {
    width: 200px;
    position: absolute;
    right: -220px;
    padding: 10px;
    margin: 10px 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    text-shadow: -1px -1px 0 rgba(0,0,0,.5);
    transition-duration: 0.3s;
}
.notification-container button {
    width: 50%;
    margin: 10px 25% 0;
}
.slide-in {
    right: 0 !important;
}

.notification-container.success {
    background: rgb(63,128,10);
}
.notification-container.fcm a{
    color: white;
}
.notification-container.error {
    background: rgba(254,26,0,.9);
}
.acc-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.acc-item .round-avatar, .round-avatar.small{
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--main-color);
    width: 38px;
    height: 38px;
    vertical-align: middle;
    flex-shrink: 0;
}
.bulk-actions {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    gap: 10px;
}

.bulk-actions .form-control {
    width: auto;
    min-width: 220px;
}

.table-checkbox {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--main-color);
    cursor: pointer;
}

.account-cell {
    min-width: 210px;
    text-align: left;
}

.account-cell .acc-item {
    margin-bottom: 4px;
}

.item-id {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}

.contact-list {
    display: flex;
    min-width: 190px;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.contact-list span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-list i {
    width: 14px;
    color: #94a3b8;
    text-align: center;
}

.compact-select {
    min-width: 130px;
}

.status-label {
    display: inline-flex;
    min-height: 25px;
    padding: 3px 9px;
    align-items: center;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-danger {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.common-data-table tr.row-disabled {
    color: #64748b;
    background: #f1f5f9;
    opacity: .8;
}

@media (max-width: 900px) {
    .bulk-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-actions .form-control,
    .bulk-actions .btn {
        width: 100%;
    }
}

.location-text {
    display: flex;
    min-width: 150px;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.location-text span:first-child {
    color: #334155;
    font-weight: 600;
}

.location-text span:not(:first-child) {
    color: #64748b;
    font-size: 12px;
}
.toggle-switch {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle-switch span {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background-color .18s ease;
}

.toggle-switch span::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgb(15 23 42 / 20%);
    transition: transform .18s ease;
}

.toggle-switch input:checked + span {
    background: var(--main-color);
}

.toggle-switch input:checked + span::before {
    transform: translateX(20px);
}

.toggle-switch input:focus-visible + span {
    box-shadow: 0 0 0 3px rgb(19 114 80 / 15%);
}

.date-list {
    display: flex;
    min-width: 110px;
    flex-direction: column;
    gap: 3px;
    white-space: nowrap;
}

.date-list span:first-child {
    color: #334155;
    font-weight: 600;
}

.date-list span:last-child {
    color: #64748b;
    font-size: 12px;
}

.content-toolbar {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.content-toolbar h2 {
    font-size: 22px;
}

.form-card {
    width: 100%;
    max-width: 900px;
    padding: 24px;
}

.form-section-title {
    display: flex;
    margin-bottom: 22px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.form-section-title h2 {
    margin-bottom: 4px;
    font-size: 21px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.form-actions {
    display: flex;
    margin-top: 8px;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.readonly-value {
    min-height: 44px;
    padding: 10px 13px;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.settings-grid .form-card {
    max-width: none;
}

.account-info {
    display: flex;
    min-width: 170px;
    flex-direction: column;
    gap: 2px;
}

.account-info span {
    color: #64748b;
    font-size: 12px;
}

.status-neutral {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.status-warning {
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

@media (max-width: 800px) {
    .content-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 18px;
    }
}

.table-input {
    min-width: 150px;
    height: 38px;
}

.language-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-link {
    display: inline-flex;
    min-width: 34px;
    height: 30px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.language-link:hover {
    color: var(--main-color);
    background: rgb(19 114 80 / 7%);
    border-color: rgb(19 114 80 / 25%);
    text-decoration: none;
}

.language-link.has-content {
    color: #fff;
    background: var(--main-color);
    border-color: var(--main-color);
}

.editor-page {
    width: 100%;
    max-width: 1300px;
}

.editor-toolbar {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
}

.editor-toolbar .form-group {
    width: 190px;
    margin: 0;
}

.editor-toolbar h2 {
    margin-top: 5px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.editor-section {
    max-width: none;
    padding: 20px;
    margin-bottom: 18px;
}

.editor-section h3 {
    margin-bottom: 14px;
    font-size: 18px;
}

.editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    padding: 12px 0;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    background: linear-gradient(to bottom, transparent, var(--main-background-color) 25%);
}

@media (max-width: 700px) {
    .editor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .editor-toolbar .form-group {
        width: 100%;
    }
}

.language-content-list {
    display: flex;
    min-width: 260px;
    flex-direction: column;
    gap: 7px;
}

.language-content-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-content-title {
    max-width: 300px;
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-tags {
    display: flex;
    margin-top: 7px;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    min-height: 27px;
    padding: 4px 9px;
    align-items: center;
    gap: 6px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-cell {
    display: flex;
    min-width: 70px;
    align-items: center;
    gap: 9px;
}

.order-number {
    min-width: 22px;
    color: #475569;
    font-weight: 600;
    text-align: center;
}

.drag-handle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    cursor: grab;
}

.drag-handle:hover {
    color: var(--main-color);
    background: rgb(19 114 80 / 7%);
    border-color: rgb(19 114 80 / 25%);
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: .35;
}

.sortable-chosen {
    background: #f8fafc;
    box-shadow: 0 8px 24px rgb(15 23 42 / 10%);
}

.sortable-dragging {
    background: #fff;
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgb(15 23 42 / 55%);
    backdrop-filter: blur(2px);
    animation: dialog-fade-in .18s ease;
}

.dialog-panel {
    display: flex;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    flex-direction: column;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgb(15 23 42 / 25%);
    animation: dialog-show .2s ease;
}

.dialog-header {
    padding: 10px;
    background-color: var(--button-color);
}

.dialog-header h2 {
    color: white;
}

.dialog-body {
    padding: 22px;
    overflow-y: auto;
    text-align: center;
    background: #fff;
}

.dialog-actions {
    margin-top: 22px;
}

.dialog-actions .btn {
    min-width: 100px;
    margin: 0 10px;
}

@keyframes dialog-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dialog-show {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 500px) {
    .dialog-overlay {
        padding: 14px;
    }

    .dialog-body {
        padding: 18px;
    }

    .dialog-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .dialog-actions .btn {
        width: 100%;
    }
}

.country-flag {
    display: flex;
    align-items: center;
    gap: 3px;
}
.flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}