body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: #f5f7fb;
    color: #182230;
}

.portal-container {
    max-width: 1140px;
    margin: auto;
    padding-inline: 1rem;
}

.portal-topline {
    padding: .6rem;
    background: #102a43;
    color: #fff;
}

.portal-topline .portal-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-header {
    background: #fff;
    box-shadow: 0 2px 12px #0001;
}

.portal-nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 1rem;
}

.portal-brand,
.topbar-brand {
    color: #17324d;
    font-weight: 700;
    text-decoration: none;
}

.portal-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-nav a {
    color: #17324d;
    text-decoration: none;
}

.hero-panel {
    border: 1px solid #d9e7f3;
    background: linear-gradient(130deg, #e9f3ff, #fff);
}

.dashboard-shell {
    min-height: 100vh;
}

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.dashboard-body {
    display: flex;
    min-height: calc(100vh - 64px);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    width: 250px;
    padding: 1rem;
    background: #112c45;
    color: #fff;
}

.sidebar-link {
    display: flex;
    gap: .7rem;
    padding: .8rem;
    border-radius: .5rem;
    color: #eaf2f8;
    text-decoration: none;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: #234765;
}

.sidebar-footer {
    margin-top: auto;
    color: #bdc9d5;
    font-size: .8rem;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

.mobile-menu-toggle {
    display: none;
}

.card {
    border: 1px solid #e5eaf0;
    box-shadow: 0 3px 12px #172b4d08;
}

/* صفحه اصلی سامانه */

.home-page {
    max-width: 1140px;
    color: #182230;
}

.home-notice {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
    padding: .85rem 1rem;
    border-right: 4px solid #d99a00;
    background: #fff4c9;
    color: #5d4a16;
}

.home-notice p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.8;
}

.home-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 2px solid #d99a00;
    border-radius: 50%;
    color: #a56c00;
    font-weight: 700;
}

.home-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid #dbe5ef;
    border-top: 4px solid #1d5588;
    background: #fff;
    box-shadow: 0 4px 16px #172b4d0b;
}

.home-eyebrow {
    display: inline-block;
    margin-bottom: .5rem;
    color: #1d5588;
    font-size: .9rem;
    font-weight: 700;
}

.home-intro h1 {
    margin: 0 0 .5rem;
    color: #17324d;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    line-height: 1.6;
}

.home-intro p {
    margin: 0;
    color: #657383;
    line-height: 1.9;
}

/* بخش واحد ورود و ثبت‌نام */

.home-intro-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .75rem;
}

.home-intro-button {
    min-width: 165px;
    text-align: center;
}

.home-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.home-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-access-card {
    min-height: 310px;
    padding: 1.5rem;
    border: 1px solid #e1e7ee;
    border-top: 4px solid #1d5588;
    background: #fff;
    box-shadow: 0 4px 16px #172b4d0b;
    text-align: center;
}

.home-access-card--employer {
    border-top-color: #c4a34c;
}

.home-access-card--worker {
    border-top-color: #1d5588;
}

.home-access-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #eef6ff;
    color: #1d5588;
    font-size: 1.8rem;
}

.home-access-card--employer .home-access-icon {
    background: #fff4c9;
    color: #a56c00;
}

.home-access-card h2 {
    margin-bottom: .75rem;
    color: #25384b;
    font-size: 1.15rem;
}

.home-access-card p {
    min-height: 75px;
    margin-bottom: 1.25rem;
    color: #657383;
    font-size: .92rem;
    line-height: 1.9;
}

.home-secondary-link {
    display: block;
    margin-top: .8rem;
    color: #657383;
    font-size: .88rem;
    text-decoration: none;
}

.home-secondary-link:hover {
    color: #1d5588;
    text-decoration: underline;
}

.home-news-panel {
    border: 1px solid #e1e7ee;
    background: #fff;
    box-shadow: 0 4px 16px #172b4d0b;
}

.home-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e6ebf0;
}

.home-section-heading h2 {
    margin: 0;
    color: #25384b;
    font-size: 1.1rem;
}

.home-section-heading a {
    color: #1d6fb8;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.home-news-list {
    padding-inline: 1.1rem;
}

.home-news-item {
    padding: 1rem 0;
    border-bottom: 1px dashed #dce3ea;
}

.home-news-item:last-child {
    border-bottom: 0;
}

.home-news-label {
    display: inline-block;
    margin-bottom: .45rem;
    padding: .2rem .5rem;
    border-radius: 4px;
    background: #eaf3ff;
    color: #1d5588;
    font-size: .72rem;
    font-weight: 700;
}

.home-news-item h3 {
    margin: 0 0 .35rem;
    color: #25384b;
    font-size: .95rem;
    line-height: 1.8;
}

.home-news-item p {
    margin: 0 0 .45rem;
    color: #687684;
    font-size: .83rem;
    line-height: 1.8;
}

.home-news-item a {
    color: #1d6fb8;
    font-size: .82rem;
    text-decoration: none;
}

.home-empty-state {
    margin: 0;
    padding: 1.5rem;
    color: #687684;
    text-align: center;
}

.home-process-section {
    margin-top: 1.5rem;
    border: 1px solid #e1e7ee;
    background: #fff;
}

.home-process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.1rem;
}

.home-process-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.home-process-item > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eaf3ff;
    color: #1d5588;
    font-weight: 700;
}

.home-process-item h3 {
    margin: 0 0 .25rem;
    color: #25384b;
    font-size: .95rem;
}

.home-process-item p {
    margin: 0;
    color: #687684;
    font-size: .82rem;
    line-height: 1.7;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.5rem;
    border: 1px solid #e1e7ee;
    background: #fff;
}

.home-stat-item {
    padding: 1rem;
    border-left: 1px solid #e1e7ee;
    text-align: center;
}

.home-stat-item:last-child {
    border-left: 0;
}

.home-stat-item strong,
.home-stat-item span {
    display: block;
}

.home-stat-item strong {
    color: #1d5588;
    font-size: 1.35rem;
}

.home-stat-item span {
    margin-top: .25rem;
    color: #687684;
    font-size: .85rem;
}

/* واکنش‌گرایی */

@media (max-width: 900px) {
    .home-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .dashboard-sidebar {
        position: fixed;
        z-index: 10;
        top: 64px;
        right: -270px;
        bottom: 0;
        transition: right .2s;
    }

    .sidebar-open .dashboard-sidebar {
        right: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .topbar-brand span:last-child {
        display: none;
    }

    .portal-nav {
        gap: .5rem;
    }

    .dashboard-main {
        padding: .75rem;
    }

    .portal-topline span {
        display: none;
    }

    .home-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .home-intro-actions {
        width: 100%;
        flex-direction: column;
    }

    .home-intro-button {
        width: 100%;
    }

    .home-access-grid,
    .home-process-grid {
        grid-template-columns: 1fr;
    }

    .home-access-card {
        min-height: auto;
    }

    .home-access-card p {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .home-page {
        padding-inline: .75rem;
    }

    .home-notice {
        align-items: flex-start;
    }

    .home-intro,
    .home-access-card {
        padding: 1.15rem;
    }

    .home-stats {
        grid-template-columns: 1fr;
    }

    .home-stat-item {
        border-right: 0;
        border-bottom: 1px solid #e1e7ee;
    }

    .home-stat-item:last-child {
        border-bottom: 0;
    }

    .home-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
