html {
    font-size: 14px;
}

.sy-print-company-name {
    display: none;
}

@media print {
    .sy-print-company-name {
        display: block !important;
        margin: 0 0 12px;
        padding: 0 0 9px;
        border-bottom: 1px solid #777;
        color: #111;
        font: bold 16pt Tahoma, Arial, sans-serif;
        text-align: center;
        direction: rtl;
        break-after: avoid;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    margin-bottom: 60px;
}



/* =========================================================
   FORM FLOATING
   ========================================================= */

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* =========================================================
   SODIYAR - MAIN PAGE
   ========================================================= */

.sy-main {
    direction: rtl;
    width: 100%;
    min-height: 100vh;
    background: #eef2f6;
    color: #243447;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}


/* =========================================================
   HEADER
   ========================================================= */

.sy-header {
    height: 86px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #162b43;
    color: #ffffff;
    padding: 0 24px;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(20, 40, 60, .15);
}


/* برند */

.sy-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}


/* لوگو */

.sy-logo {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #2f82b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
}


/* عنوان نرم افزار */

.sy-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}


/* نام شرکت */

.sy-company {
    margin-top: 3px;
    font-size: 13px;
    color: #d4deea;
    line-height: 1.5;
}


/* کاربر */

.sy-user {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* اطلاعات کاربر */

.sy-user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 3px;
}


    .sy-user-info strong {
        font-size: 14px;
        color: #ffffff;
    }


    .sy-user-info span {
        font-size: 11px;
        color: #b8c7d8;
    }


/* آواتار */

.sy-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #294763;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    border: 1px solid rgba(255,255,255,.12);
}


/* =========================================================
   BODY
   ========================================================= */

.sy-body {
    width: 100%;
    height: calc(100vh - 86px - 48px);
    min-height: 560px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sy-sidebar {
    width: 330px;
    min-width: 330px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #d8e0e8;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    box-shadow: -2px 0 10px rgba(25, 45, 65, .04);
}


/* عنوان منو */

.sy-menu-caption {
    height: 58px;
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e3e8ee;
    background: #f8fafc;
    box-sizing: border-box;
}


    .sy-menu-caption > span:first-child {
        font-size: 15px;
        font-weight: 700;
        color: #233b55;
    }


.sy-menu-code {
    font-family: Consolas, monospace;
    font-size: 11px;
    color: #7890a8;
    letter-spacing: 1px;
}


/* =========================================================
   MENU SCROLL
   ========================================================= */

.sy-menu-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
}


    /* اسکرول‌بار */

    .sy-menu-scroll::-webkit-scrollbar {
        width: 7px;
    }

    .sy-menu-scroll::-webkit-scrollbar-track {
        background: #f1f4f7;
    }

    .sy-menu-scroll::-webkit-scrollbar-thumb {
        background: #bdc9d5;
        border-radius: 10px;
    }

        .sy-menu-scroll::-webkit-scrollbar-thumb:hover {
            background: #91a3b5;
        }


/* =========================================================
   MENU GROUP
   ========================================================= */

.sy-menu-group {
    margin-bottom: 8px;
}


/* عنوان گروه */

.sy-menu-title {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #f7f9fb;
    color: #243b53;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all .18s ease;
    box-sizing: border-box;
}


    .sy-menu-title:hover {
        background: #edf4fa;
        border-color: #9db5ca;
    }


.sy-menu-title-right {
    display: flex;
    align-items: center;
    gap: 9px;
}


.sy-menu-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2678aa;
    font-size: 17px;
}


/* فلش گروه */

.sy-arrow {
    font-size: 18px;
    color: #657b90;
    transition: transform .2s ease;
}


/* وقتی گروه باز است */

.sy-menu-group.open > .sy-menu-title {
    background: #eaf3fa;
    border-color: #8eacc4;
}


    .sy-menu-group.open > .sy-menu-title .sy-arrow {
        transform: rotate(-90deg);
    }


/* =========================================================
   SUBMENU
   ========================================================= */

.sy-submenu {
    display: none;
    padding: 6px 0 2px 0;
}


.sy-menu-group.open > .sy-submenu {
    display: block;
}


/* =========================================================
   MENU NODE
   ========================================================= */

.sy-menu-node {
    width: 100%;
    margin-bottom: 3px;
}


/* =========================================================
   MENU ITEM
   ========================================================= */

.sy-menu-item {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px 6px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: #ffffff;
    color: #34495e;
    text-decoration: none;
    font-size: 12px;
    transition: all .15s ease;
    cursor: pointer;
}


    .sy-menu-item:hover {
        background: #f0f6fb;
        border-color: #d6e3ed;
        color: #1c5f89;
    }


.sy-item-right {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}


.sy-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* کد فرم */

.sy-item-code {
    min-width: 65px;
    padding: 3px 5px;
    border-radius: 4px;
    background: #f0f3f6;
    color: #718096;
    font-family: Consolas, monospace;
    font-size: 9px;
    text-align: center;
    direction: ltr;
}


/* قسمت چپ */

.sy-item-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}


/* =========================================================
   ACCESS
   ========================================================= */

.sy-access {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}


    /* دسترسی دارد */

    .sy-access.yes {
        background: #e3f6e9;
        color: #16803c;
        border: 1px solid #b9e6c7;
    }


    /* دسترسی ندارد */

    .sy-access.no {
        background: #fde8e8;
        color: #c62828;
        border: 1px solid #f2bcbc;
    }


/* آیتم بدون دسترسی */

.sy-menu-item.no-access {
    cursor: not-allowed;
    opacity: .58;
    background: #fafafa;
}


    .sy-menu-item.no-access:hover {
        background: #fafafa;
        border-color: transparent;
        color: #34495e;
    }


/* =========================================================
   CHILD MENU
   ========================================================= */

.sy-child-menu {
    display: none;
    margin: 2px 16px 5px 0;
    padding-right: 8px;
    border-right: 1px solid #d7e2eb;
}


.sy-menu-node.open > .sy-child-menu {
    display: block;
}


/* آیتمی که زیرمنو دارد */

.sy-menu-item.has-submenu {
    background: #fbfcfd;
}


    .sy-menu-item.has-submenu .sy-item-arrow {
        color: #7b8fa1;
        font-size: 16px;
        transition: transform .18s ease;
    }


.sy-menu-node.open > .sy-menu-item .sy-item-arrow {
    transform: rotate(-90deg);
}


/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.sy-sidebar-footer {
    min-height: 58px;
    border-top: 1px solid #e1e7ed;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-sizing: border-box;
}


.sy-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2eaa60;
    box-shadow: 0 0 0 4px #e1f5e8;
    flex-shrink: 0;
}


.sy-sidebar-footer div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.sy-sidebar-footer strong {
    font-size: 11px;
    color: #34495e;
}


.sy-sidebar-footer small {
    font-size: 9px;
    color: #8796a5;
}


/* =========================================================
   CONTENT
   ========================================================= */

.sy-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    padding: 28px 30px;
    box-sizing: border-box;
    background: #eef2f6;
}


/* =========================================================
   CONTENT TOP
   ========================================================= */

.sy-content-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}


.sy-breadcrumb {
    color: #8291a0;
    font-size: 12px;
    margin-bottom: 9px;
}


.sy-content-top h1 {
    margin: 0;
    color: #23384d;
    font-size: 27px;
    font-weight: 800;
}


.sy-content-top p {
    margin: 8px 0 0;
    color: #68798a;
    font-size: 13px;
}


/* وضعیت سیستم */

.sy-date-box {
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #dce4eb;
    border-radius: 9px;
    padding: 11px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 2px 7px rgba(30,50,70,.04);
}


    .sy-date-box span {
        color: #8796a5;
        font-size: 10px;
    }


    .sy-date-box strong {
        color: #25824b;
        font-size: 12px;
    }


/* =========================================================
   DASHBOARD
   ========================================================= */

.sy-dashboard {
    background: #ffffff;
    border: 1px solid #dce4eb;
    border-radius: 11px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(30,50,70,.035);
}


.sy-dashboard-title {
    font-size: 15px;
    font-weight: 700;
    color: #293f55;
    margin-bottom: 15px;
}


/* =========================================================
   QUICK CARDS
   ========================================================= */

.sy-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}


.sy-card {
    min-height: 90px;
    background: #f9fbfc;
    border: 1px solid #dce5ec;
    border-radius: 9px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #2c4054;
    box-sizing: border-box;
    transition: all .18s ease;
}


    .sy-card:hover {
        background: #f1f7fb;
        border-color: #9ebbd0;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(40,80,110,.07);
    }


.sy-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #e7f1f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}


.sy-card-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}


    .sy-card-text strong {
        font-size: 12px;
        color: #2b4258;
    }


    .sy-card-text span {
        font-size: 9px;
        color: #8796a5;
    }


.sy-card-arrow {
    font-size: 19px;
    color: #8ba0b1;
}


/* =========================================================
   EMPTY QUICK ACCESS
   ========================================================= */

.sy-empty {
    padding: 25px;
    text-align: center;
    color: #8997a4;
    font-size: 12px;
}


/* =========================================================
   INFORMATION BOXES
   ========================================================= */

.sy-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}


.sy-info-box {
    background: #ffffff;
    border: 1px solid #dce4eb;
    border-radius: 10px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 7px rgba(30,50,70,.03);
}


.sy-info-label {
    font-size: 10px;
    color: #8998a7;
}


.sy-info-box strong {
    font-size: 15px;
    color: #293f55;
}


.sy-info-box small {
    font-size: 10px;
    color: #8796a5;
}


.sy-permission {
    color: #188345 !important;
}


/* =========================================================
   FOOTER
   ========================================================= */

.sy-footer {
    height: 48px;
    width: 100%;
    background: #172b42;
    color: #aebdca;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-sizing: border-box;
    font-size: 10px;
}


/* =========================================================
   AGRICOST - MASTER FORM
   ========================================================= */

.agri-form {
    direction: rtl;
    width: 100%;
    background: #f4f6f8;
    padding: 18px;
    min-height: calc(100vh - 80px);
}


/* عنوان فرم */

.agri-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 12px;
}

    .agri-form-title h2 {
        margin: 0;
        font-size: 22px;
        font-weight: 600;
    }


/* نوار ابزار */

.agri-toolbar {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}


    /* دکمه‌ها */

    .agri-toolbar .btn {
        border-radius: 7px;
        min-width: 85px;
        font-size: 14px;
    }


/* بخش جستجو */

.agri-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}


    .agri-search input {
        width: 360px;
        height: 38px;
        border: 1px solid #cfd5db;
        border-radius: 7px;
        padding: 6px 12px;
        font-size: 14px;
    }


        .agri-search input:focus {
            outline: none;
            border-color: #6c8ebf;
            box-shadow: 0 0 0 2px rgba(108, 142, 191, .12);
        }


    .agri-search .btn {
        height: 38px;
        border-radius: 7px;
    }


/* جدول */

.agri-table-container {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    overflow: auto;
    max-height: 600px;
}


.agri-table {
    margin: 0;
    width: 100%;
    white-space: nowrap;
}


    .agri-table thead th {
        position: sticky;
        top: 0;
        z-index: 5;
        text-align: center;
        vertical-align: middle;
        padding: 11px 12px;
        font-size: 14px;
        font-weight: 600;
    }


    .agri-table tbody td {
        text-align: center;
        vertical-align: middle;
        padding: 9px 12px;
        font-size: 14px;
    }


    .agri-table tbody tr {
        cursor: pointer;
        transition: background-color .12s ease;
    }


        .agri-table tbody tr:hover {
            background-color: #f1f6fb;
        }


        .agri-table tbody tr.selected {
            background-color: #dceeff;
        }


/* پایین فرم */

.agri-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 12px;
}


.record-info {
    font-size: 14px;
    color: #555;
}


    .record-info strong {
        color: #222;
        font-weight: 600;
    }


.navigation-buttons {
    display: flex;
    gap: 5px;
}


    .navigation-buttons .btn {
        min-width: 42px;
        height: 34px;
        padding: 4px 10px;
        border-radius: 6px;
    }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .sy-sidebar {
        width: 290px;
        min-width: 290px;
    }

    .sy-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 800px) {

    .sy-header {
        padding: 0 12px;
    }

    .sy-company {
        display: none;
    }

    .sy-body {
        height: auto;
        min-height: calc(100vh - 86px);
        overflow: visible;
        flex-direction: column;
    }

    .sy-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        max-height: 500px;
    }

    .sy-menu-scroll {
        max-height: 390px;
    }

    .sy-content {
        height: auto;
        overflow: visible;
        padding: 18px;
    }

    .sy-info-grid {
        grid-template-columns: 1fr;
    }

    .sy-footer {
        height: auto;
        min-height: 48px;
        padding: 10px 15px;
        gap: 8px;
    }
}


@media (max-width: 600px) {

    .sy-title {
        font-size: 16px;
    }

    .sy-user-info {
        display: none;
    }

    .sy-content-top {
        flex-direction: column;
    }

    .sy-date-box {
        width: 100%;
        box-sizing: border-box;
    }

    .sy-cards {
        grid-template-columns: 1fr;
    }

    .agri-toolbar {
        flex-wrap: wrap;
    }

        .agri-toolbar .btn {
            min-width: 75px;
        }

    .agri-search {
        flex-wrap: wrap;
    }

        .agri-search input {
            width: 100%;
        }

    .agri-navigation {
        flex-direction: column;
        gap: 10px;
    }
}
