@font-face {
    font-family: "ZylonBody";
    src: url("../../fonts/BYekan.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "ZylonHeading";
    src: url("../../fonts/BTitrBd.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "ZylonUi";
    src: url("../../fonts/BTraffic.ttf") format("truetype");
    font-display: swap;
}

body {
    margin: 0;
    direction: rtl;
    font-family: "ZylonBody", "Vazirmatn", sans-serif;
    background: #f5f5f5;
    color: #3f4064;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../img/brand-bg-yellow.png");
    background-size: cover;
    background-position: center;
    opacity: .08;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(245, 245, 245, .92);
    z-index: -1;
    pointer-events: none;
}

.admin-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #ffffff;
    border-left: 1px solid #e0e0e2;
    padding: 18px;
}

.sidebar h3 {
    margin-top: 0;
    color: #ef4056;
    font-family: "ZylonHeading", "ZylonBody", sans-serif;
}

.sidebar a {
    display: block;
    margin-bottom: 8px;
    border-radius: 10px;
    padding: 10px 12px;
    color: #62666d;
    font-weight: 600;
    font-family: "ZylonUi", "ZylonBody", sans-serif;
}

.sidebar a:hover {
    background: #f0f0f1;
    color: #3f4064;
}

.sidebar a.sidebar-active {
    background: linear-gradient(135deg, #ef4056, #c73e52);
    color: #fff;
}

.sidebar a.sidebar-exit {
    margin-top: 24px;
    font-size: 0.9rem;
    border: 1px dashed #cfd1d9;
}

.admin-flash.ok {
    color: #047857;
    font-weight: 700;
}

.admin-flash.err {
    color: #b91c1c;
    font-weight: 700;
}

.admin-form {
    display: grid;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 24px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-family: inherit;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #ececf1;
    text-align: right;
}

.admin-table.compact th,
.admin-table.compact td {
    padding: 6px;
    font-size: 0.9rem;
}

.row-muted {
    opacity: 0.55;
}

.inline-form {
    display: inline-block;
    margin-left: 6px;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: #3f4064;
    color: #fff;
}

.btn-sm.danger {
    background: #b91c1c;
}

.btn-sm.danger-soft {
    background: #9a3412;
}

.admin-inline-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.admin-panels-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 960px) {
    .admin-panels-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

.role-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.role-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f1;
}

.seo-score-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.checkbox-inline {
    font-size: 0.9rem;
}

.content {
    padding: 22px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.kpi {
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 12px;
    padding: 14px;
}

.kpi strong {
    color: #ef4056;
    font-size: 1.25rem;
    font-family: "ZylonUi", "ZylonBody", sans-serif;
}

.chart-card {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 12px;
    padding: 14px;
}

.chart-card h3 {
    margin-top: 0;
}

#salesChart {
    width: 100%;
    max-width: 100%;
    display: block;
    border: 1px solid #f0f0f1;
    border-radius: 10px;
}

form {
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

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

.color-grid label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.interactive-preview {
    border: 2px solid #ef4056;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.interactive-preview strong {
    display: block;
    margin-bottom: 6px;
}

.interactive-preview p {
    margin: 0;
    line-height: 1.8;
}

input,
textarea,
button {
    font-family: "ZylonBody", "Vazirmatn", sans-serif;
}

input,
textarea {
    width: 100%;
    border: 1px solid #e0e0e2;
    border-radius: 10px;
    padding: 10px 11px;
    margin-bottom: 10px;
}

button {
    background: #ef4056;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: "ZylonUi", "ZylonBody", sans-serif;
}

button:hover {
    background: #d7354a;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

th,
td {
    text-align: right;
    padding: 10px;
    border-bottom: 1px solid #f0f0f1;
}

th {
    background: #fafafa;
    color: #62666d;
    font-weight: 700;
    font-family: "ZylonUi", "ZylonBody", sans-serif;
}

@media (max-width: 900px) {
    .admin-wrap {
        grid-template-columns: 1fr;
    }

    .kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        border-left: 0;
        border-bottom: 1px solid #e0e0e2;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar a {
        margin-bottom: 0;
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .content {
        padding: 14px;
    }

    form {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .kpis {
        grid-template-columns: 1fr;
    }

    .content h1 {
        font-size: 1.2rem;
    }

    input,
    textarea,
    button {
        font-size: 14px;
    }

    .sidebar a {
        flex: 1 1 100%;
    }

    .color-grid {
        grid-template-columns: 1fr;
    }
}