@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans/IRANSans-UltraLight.woff2") format("woff2");
    font-style: normal;
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans/IRANSans-Light-Expanded.woff2") format("woff2");
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans/IRANSansWeb(FaNum).woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans/IRANSans-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans/IRANSans-Black.woff2") format("woff2");
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

html, body { min-height: 100%; }
body, body * { font-family: "IRANSans", Tahoma, Arial, sans-serif !important; }
button, input, select, textarea { font-family: inherit; }
body { background: #eef0f3; }

.admin-shell {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    direction: rtl;
    min-height: 100vh;
    padding: 12px;
}

.sidebar {
    position: sticky !important;
    inset: auto !important;
    top: 12px;
    align-self: start;
    width: 132px !important;
    height: calc(100vh - 24px);
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 14px 9px !important;
    border: 0 !important;
    border-radius: 22px !important;
    background: #080a0e !important;
    box-shadow: 0 8px 26px rgb(16 24 40 / 12%);
}
.sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

.brand {
    justify-content: center;
    padding: 4px 0 16px !important;
    border: 0 !important;
}

.brand-mark {
    width: 54px !important;
    height: 54px !important;
    border-radius: 17px !important;
    background: #181d27 !important;
    color: #d8e5ff !important;
    font-size: 27px !important;
}

.brand > span:not(.brand-mark) { display: none; }
.side-label { padding: 7px 4px 10px !important; color: #778091 !important; text-align: center; }
.side-nav { display: grid !important; gap: 7px !important; }

.side-link {
    min-height: 74px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px !important;
    padding: 7px 4px !important;
    border-radius: 15px !important;
    color: #c3c8d2 !important;
    font-size: 10px !important;
    line-height: 1.35;
    text-align: center;
}

.side-link:hover { background: #181c25 !important; color: #fff !important; }
.side-link.active { background: #fff !important; color: #2867c7 !important; font-weight: 700; }

.nav-icon {
    width: 42px !important;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #171d28;
    color: #78a9ff;
}

.nav-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-link:nth-child(1) .nav-icon { color: #4a82e8; background: #eaf1ff; }
.side-link:nth-child(2) .nav-icon { color: #25a879; background: #e8f8f1; }
.side-link:nth-child(3) .nav-icon { color: #d98a26; background: #fff4e3; }
.side-link:nth-child(4) .nav-icon { color: #8c62da; background: #f2edff; }
.side-link:nth-child(5) .nav-icon { color: #df6470; background: #fff0f1; }
.side-link.active .nav-icon { background: #eef4ff; }

.sidebar-bottom { display: flex !important; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; }
.help-card { display: none !important; }
.profile { flex-direction: column; justify-content: center; gap: 5px; padding-top: 13px !important; margin-top: 6px !important; border-color: #252a34 !important; text-align: center; }
.profile .avatar { width: 42px; height: 42px; background: #202630; color: #fff; }
.profile strong { color: #f3f5f8; font-size: 9px !important; }
.profile small { color: #9aa3b2; font-size: 8px !important; }
.profile .dots { display: none; }

.admin-content-shell {
    min-width: 0;
    min-height: calc(100vh - 24px);
    overflow: hidden;
    border: 1px solid #e5e8ee;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 30px rgb(16 24 40 / 5%);
}

.main-area {
    min-height: calc(100vh - 24px) !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 22px;
    background: #fff !important;
}

.training-admin, .certificates-page { min-height: calc(100vh - 24px) !important; background: #f7f8fa !important; }
.mini-cert-code { font-family: "IRANSans", Tahoma, Arial, sans-serif !important; }

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 10px; }
    .sidebar { width: 82px !important; top: 10px; height: calc(100vh - 20px); }
    .side-link { min-height: 61px; font-size: 0 !important; }
    .nav-icon { width: 40px !important; height: 40px; }
    .admin-content-shell { min-height: calc(100vh - 20px); }
}

@media (max-width: 600px) {
    .admin-shell { grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 8px; }
    .sidebar { top: 8px; width: 68px !important; height: calc(100vh - 16px); min-height: 0; padding: 10px 5px !important; border-radius: 18px !important; }
    .brand { padding-bottom: 9px !important; }
    .brand-mark { width: 43px !important; height: 43px !important; }
    .side-label { display: none; }
    .side-link { min-height: 49px; padding: 4px 2px !important; }
    .nav-icon { width: 34px !important; height: 34px; border-radius: 10px; }
    .nav-icon svg { width: 21px; height: 21px; }
    .profile strong, .profile small { display: none; }
    .admin-content-shell { min-height: calc(100vh - 16px); border-radius: 18px; }
    .main-area { min-height: calc(100vh - 16px) !important; border-radius: 18px; }
}
