﻿@font-face {
    font-family: 'IRANSans';
    src: url('/assets/fonts/woff/IRANSansWeb(FaNum).woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/assets/fonts/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/assets/fonts/woff/IRANSansWeb(FaNum)_Bold.woff') format('woff');
    font-weight: 800;
    font-display: swap;
}

html,
body,
body *,
input,
textarea,
select,
button,
table,
label {
    font-family: 'IRANSans', Tahoma, Arial, sans-serif !important;
}

    html[dir="rtl"],
    body[dir="rtl"] {
        direction: rtl;
        text-align: right;
    }

* {
    box-sizing: border-box;
}

body,
.main-content,
#content {
    background: #f6f8fc !important;
}

/* Page */

.amfm-page {
    direction: rtl;
    text-align: right;
    position: fixed;
    top: 82px;
    right: 260px;
    left: 0;
    bottom: 68px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f6f8fc;
    padding: 28px;
}

html[data-toggled="close"] .amfm-page,
body[data-toggled="close"] .amfm-page {
    right: 90px;
}

.amfm-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Hero / Card */

.amfm-hero {
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e40af);
    box-shadow: 0 22px 55px rgba(15,23,42,.16);
}

    .amfm-hero h3 {
        color: #fff;
        font-weight: 900;
        margin: 0 0 8px;
    }

    .amfm-hero p {
        margin: 0;
        color: rgba(255,255,255,.75);
    }

.amfm-card {
    background: #fff;
    border: 1px solid #e5edf7;
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(15,23,42,.07);
    padding: 24px;
    margin-bottom: 24px;
}

.amfm-card-title {
    font-weight: 900;
    margin-bottom: 18px;
    color: #0f172a;
}

/* Form */

.form-label,
.amfm-label {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #334155;
    margin-bottom: 8px;
}

.form-control,
.form-select,
.amfm-input,
.amfm-select,
.amfm-textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #dbe4f0 !important;
    border-radius: 16px !important;
    background-color: #fff !important;
    padding: 10px 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

    .form-control:focus,
    .form-select:focus,
    .amfm-input:focus,
    .amfm-select:focus,
    .amfm-textarea:focus {
        border-color: #2563eb !important;
        box-shadow: 0 0 0 4px rgba(37,99,235,.10) !important;
    }

input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
}

select,
.form-select,
.amfm-select {
    direction: rtl !important;
    text-align: right !important;
    padding-left: 42px !important;
}

    select option,
    .form-select option,
    .amfm-select option {
        font-family: Tahoma, Arial, sans-serif !important;
        font-size: 15px;
        font-weight: 700;
    }

/* Buttons */

.amfm-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.amfm-btn {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1.4;
}

.amfm-btn-primary {
    min-height: 50px;
    padding: 0 26px;
    background: linear-gradient(135deg,#2563eb,#4f46e5);
    color: #fff !important;
}

.amfm-btn-edit {
    background: #eff6ff;
    color: #2563eb !important;
}

.amfm-btn-delete {
    background: #fee2e2;
    color: #dc2626 !important;
}

.amfm-btn-muted {
    min-height: 50px;
    background: #f1f5f9;
    color: #334155 !important;
}

/* Table */

.amfm-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.amfm-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin: 0;
}

    .amfm-table thead th {
        background: transparent;
        color: #475569;
        font-size: 13px;
        font-weight: 900;
        padding: 8px 14px;
        white-space: nowrap;
        text-align: right;
    }

    .amfm-table tbody tr {
        background: #fff;
        box-shadow: 0 8px 24px rgba(15,23,42,.06);
    }

    .amfm-table tbody td {
        color: #0f172a;
        font-weight: 800;
        padding: 14px;
        vertical-align: middle;
        background: #fff;
        white-space: nowrap;
        border: 0;
    }

        .amfm-table tbody td:first-child {
            border-radius: 0 18px 18px 0;
        }

        .amfm-table tbody td:last-child {
            border-radius: 18px 0 0 18px;
        }

/* Common */

.amfm-logo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
    background: #f1f5f9;
    border: 1px solid #e5edf7;
}

.amfm-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 22px;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.amfm-preview {
    width: 220px;
    height: 150px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid #e5edf7;
    background: #f1f5f9;
    padding: 4px;
}

/* Asset Management Ajax Cards */

.amfm-asset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.amfm-asset-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5edf7;
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
}

.amfm-asset-photo {
    width: 105px;
    height: 105px;
    flex: 0 0 105px;
    border-radius: 20px;
    background: #f1f5f9;
    overflow: hidden;
    border: 1px solid #e5edf7;
}

.amfm-asset-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.amfm-asset-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.amfm-asset-body {
    min-width: 0;
    flex: 1;
}

.amfm-asset-title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amfm-asset-meta {
    font-size: 13px;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 5px;
}

    .amfm-asset-meta b {
        color: #0f172a;
    }

/* Asset Wall Tree */

.amfm-tree-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.amfm-tree-item {
    background: #f8fafc;
    border: 1px solid #e5edf7;
    border-radius: 22px;
    padding: 14px;
}

.amfm-tree-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.amfm-tree-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5edf7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    font-size: 22px;
}

.amfm-tree-info {
    min-width: 0;
    flex: 1;
}

.amfm-tree-title {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amfm-tree-sub {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Asset Wall Cards */

.amfm-wall-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.amfm-wall-card {
    height: 100%;
    min-height: 405px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5edf7;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.amfm-wall-img-box {
    width: 100%;
    height: 190px;
    min-height: 190px;
    max-height: 190px;
    background: #f1f5f9;
    overflow: hidden;
}

.amfm-wall-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.amfm-wall-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    min-width: 0;
}

.amfm-wall-title {
    height: 28px;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amfm-wall-meta {
    height: 24px;
    font-size: 13px;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .amfm-wall-meta b {
        color: #0f172a;
    }

.amfm-wall-desc {
    height: 52px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amfm-wall-footer {
    margin-top: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.amfm-wall-price {
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */

.amfm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0 0 14px;
    list-style: none;
    flex-wrap: wrap;
}

    .amfm-pagination a {
        min-width: 42px;
        min-height: 42px;
        padding: 8px 14px;
        border-radius: 14px;
        background: #f1f5f9;
        color: #334155;
        font-weight: 900;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .amfm-pagination .active a {
        background: linear-gradient(135deg,#2563eb,#4f46e5);
        color: #fff;
    }

    .amfm-pagination .disabled a {
        opacity: .45;
        pointer-events: none;
    }

.amfm-page-info {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

/* Responsive */

@media (max-width: 1200px) {
    .amfm-wall-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .amfm-asset-grid,
    .amfm-tree-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .amfm-page {
        right: 90px;
    }

    .amfm-wall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .amfm-wall-card {
        min-height: 390px;
    }

    .amfm-wall-img-box,
    .amfm-wall-img {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
}

@media (max-width: 768px) {
    .amfm-page {
        top: 92px;
        right: 0 !important;
        left: 0 !important;
        bottom: 72px;
        padding: 14px;
    }

    .amfm-card,
    .amfm-hero {
        border-radius: 22px;
        padding: 18px;
    }

    .amfm-table {
        min-width: 650px;
    }

    .amfm-btn-primary,
    .amfm-btn-muted {
        width: 100%;
    }

    .amfm-actions {
        justify-content: stretch;
    }

    .amfm-asset-grid,
    .amfm-wall-grid,
    .amfm-tree-list {
        grid-template-columns: 1fr;
    }

    .amfm-asset-card {
        flex-direction: column;
    }

    .amfm-asset-photo {
        width: 100%;
        height: 190px;
        flex: unset;
    }

    .amfm-preview {
        width: 100%;
        height: 190px;
    }

    .amfm-wall-card {
        min-height: 380px;
    }

    .amfm-wall-img-box,
    .amfm-wall-img {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }

    .amfm-wall-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .amfm-tree-main {
        align-items: flex-start;
    }
}
