        @font-face {
            font-family: 'Vazirmatn';
            src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');
            font-weight: normal;
            font-style: normal;
            font-display: block;
        }
        input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: #F8F8FF !important;
}
input,
textarea,
select,
td,
p,
span,
strong,
small {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

.range-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}
.properties-sale-table tbody tr:nth-child(odd) {
    background: #FFFFFF !important;
}

.properties-sale-table tbody tr:nth-child(even) {
    background: #E8E8E8 !important;
}

/* موبایل */
@media (max-width: 600px) {
    .matching-table {
        width: 100% !important;
        table-layout: fixed !important;
        min-width: 430px !important;
        white-space: nowrap;
    }

    .matching-table th,
    .matching-table td {
        padding: 10px 4px !important;
        font-size: 0.95rem !important;
        word-break: normal;
        white-space: nowrap;
    }

    .matching-table th:nth-child(1) {
        width: 30% !important;
        min-width: 100px;
    }

    .matching-table th:nth-child(2) {
        width: 25% !important;
        min-width: 90px;
    }

    .matching-table th:nth-child(3) {
        width: 22% !important;
        min-width: 80px;
    }

    .matching-table th:nth-child(4) {
        width: 23% !important;
        min-width: 90px;
    }

    .matching-card {
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: auto;
    }

    .matching-card .table-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .matching-table td:nth-child(3) {
        white-space: nowrap !important;
        letter-spacing: 1px;
    }

    .matching-table td:nth-child(4) .btn-info {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.85rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .matching-table th:first-child,
    .matching-table td:first-child {
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: right;
    }

    .matching-table th:first-child,
    .matching-table td:first-child {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* کامپیوتر */
@media (min-width: 601px) {
    .matching-table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    .matching-table th,
    .matching-table td {
        padding: 10px 12px !important;
    }

    .matching-table th:nth-child(1) {
        width: 32% !important;
    }

    .matching-table th:nth-child(2) {
        width: 32% !important;
    }

    .matching-table th:nth-child(3) {
        width: 18% !important;
    }

    .matching-table th:nth-child(4) {
        width: 18% !important;
    }
}

.range-title {
    min-width: 90px;
    font-weight: 900;
    color: #4E342E;
    font-size: 1rem;
    text-align: right;
}

.range-word {
    font-weight: 900;
    color: #6D4C41;
    font-size: 0.9rem;
    white-space: nowrap;
}

.range-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 12px 10px;
    border: 2px solid #D7CCC8;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    background: #FAFAFA;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-weight: bold;
}

/* موبایل */
@media (max-width: 600px) {
    .range-title {
        min-width: 75px;
        font-size: 0.9rem;
    }

    .range-input {
        padding: 10px 6px;
        font-size: 14px;
    }

    .range-word {
        font-size: 0.8rem;
    }
}
/* موبایل: منطبق‌کردن کادر سفید با جدول مچینگ */
@media (max-width: 600px) {
    .matching-card {
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .matching-card .table-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .matching-card .matching-table {
        margin: 0 !important;
        border-radius: 0;
    }

    .matching-card .matching-table th,
    .matching-card .matching-table td {
        padding: 12px 8px !important;
    }
}

        *{box-sizing:border-box;margin:0;padding:0;}
        body{background:#dbf9e4;font-family:'Vazirmatn','Tahoma',sans-serif;min-height:100vh;font-size:22px;}
        .container{max-width:1400px;margin:0 auto;padding:15px;}
        .header{background:linear-gradient(135deg,#3E2723,#4E342E,#3E2723);color:white;padding:30px;border-radius:20px;margin-bottom:25px;text-align:center;box-shadow:0 8px 30px rgba(78,52,46,0.6), 0 0 0 3px #C9A96E, 0 0 0 6px #4E342E;}

        .card{background:white;border-radius:16px;padding:25px;margin-bottom:15px;box-shadow:0 2px 12px rgba(78,52,46,0.1);border:1px solid #E8D5B5;overflow-x:auto;}

        .btn{display:block;width:100%;padding:20px;border:none;border-radius:14px;cursor:pointer;font-size:1.5rem;text-decoration:none;font-weight:bold;text-align:center;transition:all 0.3s;margin-top:12px;font-family:'Vazirmatn','Tahoma',sans-serif;}
        .btn-primary{background:linear-gradient(to right,#3498db,#2980b9);color:white;box-shadow:0 2px 8px rgba(52,152,219,0.4);}
        .btn-success{background:linear-gradient(to right,#27ae60,#2ecc71);color:white;}
        .btn-danger{background:#cc0906;color:white;margin-top:15px;font-size:1.3rem;padding:18px;}
#kolangiStatusDropdown label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #f0ebe4;
    cursor: pointer;
}

#kolangiStatusDropdown label:last-child {
    border-bottom: none;
}

#kolangiStatusDropdown input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #27ae60;
}
.btn-sm, .btn-edit, .btn-star, .delete-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:35px;
    width:64px;
    min-width:64px;
    max-width:64px;
    padding:0;
    font-size:0.8rem;
    line-height:1;
    box-sizing:border-box;
    white-space:nowrap;
    cursor:pointer;
    border-radius:8px;
}
@media(max-width:600px){
    .btn-gold-3d {
        padding: 18px 12px !important;
        font-size: 1.3rem !important;
        width: 75% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .btn-gold-3d + .btn-gold-3d {
        margin-top: 15px;
    }

    .notes-landing-buttons {
        max-width: 340px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
.option-yes, .option-no {
    opacity: 0.35;
    transition: opacity 0.2s, border 0.2s;
}

.btn-gold-3d {
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22.5px 15px;  /* قبلاً 25px بود */
    border-radius:20px;
    text-decoration:none;
    color:#593000;
    font-size:1.6rem;
    font-weight:900;
    font-family:'Vazirmatn','Tahoma',sans-serif;
    background:linear-gradient(180deg, #fff8a1 0%, #ffe14b 17%, #ffbf0c 69%, #e99a00 100%);
    box-shadow:0 6px 0 #b47b00, 0 12px 25px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.96), inset 0 -2px 2px rgba(152,78,0,0.62);
    text-shadow:0 2px 4px rgba(0,0,0,0.2);
    border:1px solid #925300;
    position:relative;
    overflow:hidden;
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-gold-3d::after {
    content:'';
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:45%;
    background:linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
    pointer-events:none;
}

.btn-gold-3d:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 0 #b47b00, 0 16px 30px rgba(0,0,0,0.4), inset 0 2px 2px rgba(255,255,255,0.96), inset 0 -2px 2px rgba(152,78,0,0.62);
}

.btn-gold-3d:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #b47b00, 0 6px 12px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.96), inset 0 -2px 2px rgba(152,78,0,0.62);
}

.btn-edit{background:#C9A96E;color:#ffffff;border:none;text-decoration:none;}

.btn-star{
    background:#000000;
    color:#FFD700;
    border:2px solid #FFD700;
    font-size:1.3rem;
}

.btn-sm{
    border:none;
    padding:0;
    width:64px !important;
    min-width:64px;
    max-width:64px;
    height:35px;
    margin:0;
    vertical-align:middle;
    white-space:nowrap;
    font-size:0.8rem;
    line-height:1;
}
        .delete-icon{background:#e74c3c;color:#ffffff;border:2px solid #e74c3c;text-decoration:none;}
        .action-btns{display:flex;gap:18px;align-items:center;justify-content:flex-end;white-space:nowrap;width:100%;padding-left:20px;}
        th:last-child, td:last-child{min-width:220px;}

        .home-buttons{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:-30px;}
        @media(max-width:500px){.home-buttons{grid-template-columns:1fr;}}
.home-btn{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:25px 15px;
    border-radius:20px;
    text-decoration:none;
    color:white;
    font-size:1.65rem;
    font-weight:900;
    transition:all 0.15s ease;
    font-family:'Vazirmatn','Tahoma',sans-serif;
    min-height:120px;
    position:relative;
    overflow:hidden;
    box-shadow:0 6px 0 rgba(0,0,0,0.25), 0 12px 25px rgba(0,0,0,0.3);
    text-shadow:0 2px 4px rgba(0,0,0,0.2);
}
        .home-btn::after{
            content:'';
            position:absolute;
            top:0;
            left:0;
            width:100%;
            height:45%;
            background:linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
            border-radius:20px 20px 0 0;
            pointer-events:none;
        }
        .home-btn:hover{
            transform:translateY(-4px);
            box-shadow:0 12px 25px rgba(0,0,0,0.3), 0 6px 0 rgba(0,0,0,0.15);
        }
        .home-btn:active{
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.25), 0 6px 12px rgba(0,0,0,0.3);
}
        .btn-sale{background:linear-gradient(to bottom,#1a4f8b,#143f72);box-shadow:0 6px 0 #0d2b4f, 0 12px 25px rgba(0,0,0,0.3);}
        .btn-buyer{background:linear-gradient(to bottom,#2a6cb8,#205da8);box-shadow:0 6px 0 #164278, 0 12px 25px rgba(0,0,0,0.3);}
        .btn-rent{background:linear-gradient(to bottom,#236b13,#1b4d10);box-shadow:0 6px 0 #123607, 0 12px 25px rgba(0,0,0,0.3);}
        .btn-renter{background:linear-gradient(to bottom,#3b9422,#2f7a1b);box-shadow:0 6px 0 #1e5511, 0 12px 25px rgba(0,0,0,0.3);}
        .btn-phonebook{background:linear-gradient(to bottom,#9b59b6,#8e44ad);box-shadow:0 6px 0 #6c3483, 0 12px 25px rgba(0,0,0,0.3);}

        .filter-toggle-btn{
            display:inline-flex;align-items:center;gap:8px;cursor:pointer;
            background:linear-gradient(to right,#27ae60,#2ecc71);color:#ffffff;
            padding:12px 20px;border-radius:10px;font-size:1.1rem;font-weight:bold;
            font-family:'Vazirmatn','Tahoma',sans-serif;
            box-shadow:0 2px 8px rgba(46,204,113,0.4);
        }

.sort-toggle-btn{
    display:inline-flex;align-items:center;gap:8px;cursor:pointer;
    background:#063D73;color:#ffffff;
    padding:12px 20px;border-radius:10px;font-size:1.1rem;font-weight:bold;
    font-family:'Vazirmatn','Tahoma',sans-serif;
    box-shadow:0 2px 8px rgba(6,61,115,0.4);
}

        .filter-section{display:none;margin-bottom:15px;}
        .filter-section.active{display:block;}
        .filter-row{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap;align-items:flex-end;}
        .filter-row .filter-item{flex:1;min-width:80px;}
        .filter-row input,.filter-row select{width:100%;padding:14px 10px;border:2px solid #D7CCC8;border-radius:10px;font-size:18px;text-align:center;background:#FAFAFA;font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:bold;}
        .filter-row input:focus,.filter-row select:focus{border-color:#C9A96E;outline:none;}
        .filter-row .filter-label{font-size:1.3rem;color:#4E342E;margin-bottom:4px;text-align:center;font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:bold;}
        .search-btn{background:#167E82 !important;color:#ffffff !important;border:none;padding:14px 24px;border-radius:10px;cursor:pointer;font-size:18px;display:flex;align-items:center;gap:5px;margin-top:14px;font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:bold;}

        .table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -10px;padding:0 10px;}
        table{width:100%;border-collapse:collapse;font-size:1.1rem;border-radius:12px;overflow:hidden;min-width:700px;}
        th{background:#4E342E;color:#FFD700;padding:16px 12px;text-align:center;font-size:1.1rem;font-family:'Vazirmatn','Tahoma',sans-serif;white-space:nowrap;}
        td{padding:14px 10px;text-align:center;border-bottom:1px solid #EFEBE9;font-size:1.05rem;font-family:'Vazirmatn','Tahoma',sans-serif;white-space:nowrap;}
        tr:hover{background:#FDF8F0;}

        .form-group{margin-bottom:10px;}
        .form-group label{display:block;margin-bottom:0px;font-size:1.1rem;color:#4E342E;font-weight:bold;font-family:'Vazirmatn','Tahoma',sans-serif;}
.form-group input,
.form-group textarea,
.form-group select {
    width:100%;
    padding:9px;
    border:2px solid #D7CCC8;
    border-radius:9px;
    font-size:16.5px;
    background:#FAFAFA;
    font-family:'Vazirmatn','Tahoma',sans-serif;
}
        .form-group input:focus,.form-group textarea:focus,.form-group select:focus{border-color:#C9A96E;outline:none;}
        .form-group textarea{height:100px;resize:vertical;}
        .form-row{display:flex;gap:10px;flex-wrap:wrap;}
        .form-row .form-group{flex:1;min-width:130px;}

        .flash{background:#e74c3c;color:#ffffff;padding:16px;border-radius:10px;margin-bottom:15px;font-size:1.2rem;text-align:center;font-weight:bold;font-family:'Vazirmatn','Tahoma',sans-serif;}

        .detail-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:200;justify-content:center;align-items:center;}
        #imageViewer{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.9);z-index:300;justify-content:center;align-items:center;}
        .detail-overlay .detail-card{max-width:500px;width:90%;position:relative;}
        .detail-overlay .close-btn{position:absolute;top:12px;left:15px;cursor:pointer;font-size:30px;color:#8D6E63;}
        .detail-overlay p{margin:8px 0;font-size:1.2rem;color:#4E342E;font-family:'Vazirmatn','Tahoma',sans-serif;}
        .detail-body{max-height:60vh;overflow-y:auto;padding-right:5px;}

        .type-badge{padding:6px 14px;border-radius:6px;font-size:1rem;color:white;font-weight:bold;font-family:'Vazirmatn','Tahoma',sans-serif;}
        .date-picker-group{display:flex;gap:3px;}
        .date-picker-group select{flex:1;padding:14px 6px;border:2px solid #D7CCC8;border-radius:10px;font-size:16px;text-align:center;background:#FAFAFA;font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:bold;}
        .section-title{font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:bold;font-size:1.6rem;}
        .empty-text{font-size:1.4rem;color:#4E342E;font-family:'Vazirmatn','Tahoma',sans-serif;}

        .top-action-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
            align-items: center;
            justify-content: flex-start;
        }

        .top-action-bar .btn,
        .top-action-bar .filter-toggle-btn,
        .top-action-bar .sort-toggle-btn {
            font-size: 1rem;
            padding: 12px 18px;
            border-radius: 10px;
            flex: 0 0 auto;
        }

        .utility-row {
            display: flex;
            flex-direction: row;
            gap: 8px;
            width: 100%;
            grid-column: 1 / -1;
        }

.option-yes,
.option-no {
    padding: 10px 18px !important;
    margin: 4px !important;
    border-radius: 10px !important;
    font-size: 1.1rem !important;
    font-weight: bold;
    cursor: pointer;
    background:#27ae60;
    color:white;
    border:none;
    transition: all 0.3s;
}

.option-no {
    background:#e74c3c;
}

        .header.section-title {
            padding: 20px;
            font-size: 1.4rem;
        }

        .top-action-bar .btn-primary {
            position: relative;
            overflow: hidden;
            font-weight: 900;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
            box-shadow: 0 8px 20px rgba(52,152,219,0.5), 0 4px 0 #2471a3;
        }

        .top-action-bar .btn-primary::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 45%;
            background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
            border-radius: 10px 10px 0 0;
            pointer-events: none;
        }

        .top-action-bar .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 25px rgba(52,152,219,0.6), 0 6px 0 #2471a3;
        }
        
        .action-btns .btn-star,
        .action-btns .btn-primary,
        .action-btns .btn-edit,
        .action-btns .delete-icon,
        .action-btns .btn-sm {
    position: relative;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 8px 18px rgba(0,0,0,0.25);
}

        .action-btns .btn-star::after,
        .action-btns .btn-primary::after,
        .action-btns .btn-edit::after,
        .action-btns .delete-icon::after,
        .action-btns .btn-sm::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
    pointer-events: none;
}

.action-btns .btn-star:active,
.action-btns .btn-primary:active,
.action-btns .btn-edit:active,
.action-btns .delete-icon:active,
.action-btns .btn-sm:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.25);
}
.filter-toggle-btn,
.sort-toggle-btn,
.btn-sm.btn-danger {
    position: relative;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 8px 18px rgba(0,0,0,0.25);
}

.filter-toggle-btn::after,
.sort-toggle-btn::after,
.btn-sm.btn-danger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
    pointer-events: none;
}

.filter-toggle-btn:active,
.sort-toggle-btn:active,
.btn-sm.btn-danger:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.25);
}
.utility-row a,
.profile .btn,
.profile .btn-sm,
.profile .btn-primary,
.profile .btn-success,
.profile .btn-danger,
.admin-users .btn,
.admin-users .btn-sm,
.edit-user .btn,
.edit-user .btn-sm {
    position: relative;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 8px 18px rgba(0,0,0,0.25);
}

.utility-row a::after,
.profile .btn::after,
.profile .btn-sm::after,
.admin-users .btn::after,
.admin-users .btn-sm::after,
.edit-user .btn::after,
.edit-user .btn-sm::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
    pointer-events: none;
}

.utility-row a:active,
.profile .btn:active,
.profile .btn-sm:active,
.admin-users .btn:active,
.admin-users .btn-sm:active,
.edit-user .btn:active,
.edit-user .btn-sm:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.25);
}
.btn-success,
.btn-danger,
.btn-primary,
.btn-sm.btn-danger,
.btn-sm.btn-success {
    position: relative;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 8px 18px rgba(0,0,0,0.25);
}

.btn-success::after,
.btn-danger::after,
.btn-primary::after,
.btn-sm.btn-danger::after,
.btn-sm.btn-success::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
    pointer-events: none;
}

.btn-success:active,
.btn-danger:active,
.btn-primary:active,
.btn-sm.btn-danger:active,
.btn-sm.btn-success:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
    .ptype-selector-dropdown {
        max-height: none !important;
        overflow: visible !important;
    }

    .ptype-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        padding: 8px 2px;
    }

    .ptype-item-name {
        flex: 0 0 auto;
        font-size: 1rem;
        font-weight: bold;
        color: #3E2723;
    }

    .ptype-actions {
        display: flex;
        gap: 4px;
        margin-right: auto;
    }

    .ptype-btn {
        min-width: 0 !important;
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        text-align: center;
        border-radius: 8px !important;
    }
}
.ptype-btn {
    overflow: hidden;
}

.ptype-btn span {
    display: block;
    width: 100%;
    padding: 4px 0;
    border-radius: 8px;
    transition: all 0.2s;
}

.ptype-btn input:checked + span {
    background: #27ae60 !important;
    color: white !important;
    padding: 4px 0 !important;
}

        @media(min-width:601px){
            .banner-img {
                max-width: 1400px !important;
            }
        }

                @media(max-width:600px){
            table{font-size:0.85rem;} th,td{padding:8px 4px;}
            .form-row{flex-direction:column;} .form-row .form-group{min-width:100%;}
            .filter-row {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }
            a.home-btn[href="/buyers"] {
    min-height: 72px !important;
}

a.home-btn[href="/renters"] {
    min-height: 72px !important;
}

a.home-btn[href="/archive-properties-sale"] {
    min-height: 67px !important;
}

            .filter-row .filter-item {
                min-width: 100%;
            }
            .utility-row a {
    min-height: 50px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

            .manager-photo {
                width: 92px !important;
                height: 92px !important;
                max-width: 92px !important;
                max-height: 92px !important;
            }
            .utility-row a {
    min-height: 50px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    flex: 0 0 40% !important;
    max-width: 40% !important;
}

            .filter-row input,
            .filter-row select {
                font-size: 16px;
                padding: 12px;
            }

            a.home-btn[href="/phonebook"] {
                min-height: 71px !important;
                padding-top: 12px !important;
                padding-bottom: 12px !important;
            }

            a.home-btn[href="/archive-properties-sale"] {
                min-height: 70px !important;
                padding-top: 11px !important;
                padding-bottom: 11px !important;
            }

            .option-yes,
            .option-no {
                padding: 8px 14px !important;
                font-size: 0.85rem !important;
            }

            .filter-row .filter-label{font-size:1.1rem;}
            .action-btns{gap:12px;} .btn-sm{padding:8px 10px;font-size:0.8rem;} .btn-edit{padding:6px 8px;font-size:0.8rem;} .delete-icon{font-size:1rem;} .home-btn{font-size:1.27rem !important;min-height:74px;padding:13px 5px;}

            .top-action-bar {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }

            .top-action-bar .btn-primary {
                width: 90% !important;
                max-width: 90% !important;
                margin: 0 auto !important;
                font-size: 1.3rem !important;
                font-weight: 900 !important;
                padding: 16px 20px !important;
                letter-spacing: 0.5px;
            }

            .top-action-bar .action-row {
                display: flex;
                flex-direction: row;
                gap: 4px;
                width: 90%;
                margin: 0 auto;
            }

            .top-action-bar .action-row .filter-toggle-btn,
            .top-action-bar .action-row .sort-toggle-btn {
                flex: 1 1 0;
                width: auto !important;
                max-width: none !important;
                margin: 0 !important;
                font-size: 0.7rem;
                padding: 8px 0;
                justify-content: center;
                text-align: center;
                box-sizing: border-box;
            }

            .utility-row {
                display: flex;
                flex-direction: row;
                gap: 8px;
                width: 100%;
            }

            .top-action-bar .action-row .btn-sm {
                flex: 0 0 25%;
                width: auto !important;
                max-width: none !important;
                margin: 0 !important;
                font-size: 0.7rem;
                padding: 8px 0;
                justify-content: center;
                text-align: center;
                box-sizing: border-box;
            }
        }
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes colorBlink {
    0%, 100% { color: #e74c3c; }
    50% { color: #FFD700; }
}

/* ========== Gold Rail Component ========== */
.gold-rail-container {
    container-type: inline-size;
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    aspect-ratio: 1578 / 400;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.gold-rail-container .gold-rail {
    position: absolute;
    z-index: 1;
    inset-inline: 0;
    top: 16.6667%;
    height: 66.6667%;
    overflow: hidden;
    border: 0.13cqw solid #925300;
    border-radius: 2.35cqw;
    background: linear-gradient(180deg,
        #fff8a1 0%,
        #ffe14b 17%,
        #ffbf0c 69%,
        #e99a00 100%);
    box-shadow: 0 0 0 0.15cqw #ffbd12,
        0 0 0 0.25cqw #fff074,
        0 0 0 0.35cqw rgba(170, 91, 0, 0.92),
        0 0.86cqw 1.02cqw rgba(0, 0, 0, 0.23),
        0 0.2cqw 0.22cqw rgba(0, 0, 0, 0.16),
        inset 0 0.18cqw 0.18cqw rgba(255, 255, 255, 0.96),
        inset 0 -0.2cqw 0.26cqw rgba(152, 78, 0, 0.62);
}

.gold-rail-container .gold-rail::before {
    content: "";
    position: absolute;
    inset: 0.83cqw 0.94cqw;
    border: 0.13cqw solid #a66000;
    border-radius: 1.55cqw;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.78) 0%,
        rgba(255, 250, 166, 0.68) 8%,
        rgba(255, 222, 80, 0.18) 45%,
        rgba(255, 183, 0, 0.08) 78%,
        rgba(170, 91, 0, 0.18) 100%),
        linear-gradient(180deg,
        #fff584 0%,
        #ffdf55 36%,
        #f7bb17 72%,
        #dda000 100%);
    box-shadow: 0 0 0 0.13cqw #ffd326,
        inset 0 0.2cqw 0.22cqw rgba(255, 255, 255, 0.82),
        inset 0 -0.24cqw 0.3cqw rgba(119, 60, 0, 0.48),
        0 0.12cqw 0.18cqw rgba(104, 51, 0, 0.24);
}

.gold-rail-container .gold-rail::after {
    content: "";
    position: absolute;
    inset-inline: 1.55cqw;
    top: 0.65cqw;
    height: 0.14cqw;
    border-radius: 999px;
    background: rgba(255, 255, 225, 0.82);
    filter: blur(0.03cqw);
    opacity: 0.84;
}

.gold-rail-container .side-choice,
.gold-rail-container .medallion {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    user-select: none;
    font: inherit;
}

.gold-rail-container .side-choice {
    position: absolute;
    z-index: 3;
    top: 16.6667%;
    width: 50%;
    height: 66.6667%;
    margin: 0;
    padding: 0;
    border: 0.13cqw solid #925300;
    outline: 0;
    background: linear-gradient(180deg,
        #fff8a1 0%,
        #ffe14b 17%,
        #ffbf0c 69%,
        #e99a00 100%);
    color: var(--brown);
    font-size: 5.2cqw;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 0 0 0.15cqw #ffbd12,
        0 0 0 0.25cqw #fff074,
        0 0 0 0.35cqw rgba(170, 91, 0, 0.92),
        0 6px 0 #b47b00,
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 0.18cqw 0.18cqw rgba(255, 255, 255, 0.96),
        inset 0 -0.2cqw 0.26cqw rgba(152, 78, 0, 0.62);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.gold-rail-container .side-choice--sale {
    inset-inline-start: 0;
    border-radius: 0 2.35cqw 2.35cqw 0;
}

.gold-rail-container .side-choice--rent {
    inset-inline-end: 0;
    border-radius: 2.35cqw 0 0 2.35cqw;
}

.gold-rail-container .side-choice--sale {
    inset-inline-start: 0;
}

.gold-rail-container .side-choice--rent {
    inset-inline-end: 0;
}

.gold-rail-container .side-choice__label,
.gold-rail-container .medallion__label {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: block;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    color: #593000;
    -webkit-text-stroke: 0.05cqw #3b1e00;
    text-shadow: 0 0.09cqw 0 rgba(255, 230, 101, 0.95),
        0 0.18cqw 0.1cqw rgba(112, 56, 0, 0.3);
    transform: translate(-50%, -50%);
}

.gold-rail-container .side-choice--sale .side-choice__label {
    transform: translate(calc(-50% + 4.75cqw), -50%);
}

.gold-rail-container .side-choice--rent .side-choice__label {
    transform: translate(calc(-50% - 4.75cqw), -50%);
}

.gold-rail-container .medallion {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 22%;
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    border: 0.13cqw solid #8f4e00;
    border-radius: 50%;
    outline: 0;
    background: linear-gradient(180deg,
        #fff379 0%,
        #ffd01b 35%,
        #eda300 71%,
        #ffbd0a 100%);
    box-shadow: 0 0 0 0.15cqw #ffb600,
        0 0 0 0.27cqw #fff27a,
        0 0 0 0.37cqw rgba(142, 73, 0, 0.96),
        0 0.84cqw 0.94cqw rgba(0, 0, 0, 0.25),
        0 0.18cqw 0.22cqw rgba(0, 0, 0, 0.16),
        inset 0 0.2cqw 0.22cqw rgba(255, 255, 255, 0.9),
        inset 0 -0.25cqw 0.28cqw rgba(130, 64, 0, 0.47);
    transform: translate(-50%, -50%);
}

.gold-rail-container .medallion::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 6.55%;
    border: 0.19cqw solid #874900;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 53%,
        #ffffd8 0%,
        #fffdbb 30%,
        #fff38a 63%,
        #ffdc45 100%);
    box-shadow: 0 0 0 0.12cqw #ffc10e,
        0 0 0 0.25cqw #ffdc47,
        inset 0 0.25cqw 0.38cqw rgba(255, 255, 255, 0.9),
        inset 0 -0.22cqw 0.3cqw rgba(212, 137, 0, 0.24),
        0 0.11cqw 0.12cqw rgba(93, 43, 0, 0.32);
}

.gold-rail-container .medallion::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 23%;
    right: 23%;
    top: 9.5%;
    height: 7%;
    border-radius: 50%;
    background: rgba(255, 255, 220, 0.68);
    filter: blur(0.12cqw);
}

.gold-rail-container .medallion__label {
    width: 100%;
    font-size: 5.2cqw;
    font-weight: 900;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    line-height: 1;
    text-align: center;
    transform: translate(-50%, -50%);
    -webkit-text-stroke: 0.13cqw #3b1e00;
    text-shadow: 0 0.16cqw 0 rgba(255, 230, 101, 0.95),
        0 0.3cqw 0.2cqw rgba(112, 56, 0, 0.55);
}

.gold-rail-container .side-choice:hover,
.gold-rail-container .medallion:hover {
    filter: brightness(1.025) saturate(1.02);
}

.gold-rail-container .side-choice:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 0.15cqw #ffbd12,
        0 0 0 0.25cqw #fff074,
        0 0 0 0.35cqw rgba(170, 91, 0, 0.92),
        0 8px 0 #b47b00,
        0 16px 30px rgba(0, 0, 0, 0.4),
        inset 0 0.18cqw 0.18cqw rgba(255, 255, 255, 0.96),
        inset 0 -0.2cqw 0.26cqw rgba(152, 78, 0, 0.62);
}

.gold-rail-container .side-choice:active .side-choice__label {
    transform: translate(calc(-50% + 4.75cqw), calc(-50% + 0.08cqw));
}

.gold-rail-container .side-choice--rent:active .side-choice__label {
    transform: translate(calc(-50% - 4.75cqw), calc(-50% + 0.08cqw));
}

.gold-rail-container .side-choice:active {
    transform: translateY(4px);
    filter: brightness(0.95);
    box-shadow: 0 0 0 0.15cqw #ffbd12,
        0 0 0 0.25cqw #fff074,
        0 0 0 0.35cqw rgba(170, 91, 0, 0.92),
        0 2px 0 #b47b00,
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 0.18cqw 0.18cqw rgba(255, 255, 255, 0.96),
        inset 0 -0.2cqw 0.26cqw rgba(152, 78, 0, 0.62);
}

.gold-rail-container .medallion:active {
    transform: translate(-50%, -50%) scale(0.992);
}

.gold-rail-container .side-choice:focus-visible,
.gold-rail-container .medallion:focus-visible {
    outline: 0.2cqw solid #6a3900;
    outline-offset: 0.28cqw;
}

@media (prefers-reduced-motion: no-preference) {
    .gold-rail-container .side-choice,
    .gold-rail-container .medallion {
        transition: filter 130ms ease, transform 90ms ease;
    }
}

/* ========== ردیف ۴ مدالیون طلایی ========== */
.medallions-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 700px;
    margin: -15px auto 0 auto;
    grid-column: 1 / -1;   /* این خط اضافه شد */
    direction: rtl;
    -webkit-tap-highlight-color: transparent;
}

.medallion-shell {
    position: relative;
    flex: 1 1 0;
    max-width: 154px;
    aspect-ratio: 1;
    container-type: inline-size;
    overflow: visible;
}

.gold-medallion {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0.684cqw solid #8f4e00;
    border-radius: 50%;
    outline: 0;
    background: linear-gradient(180deg, #fff379 0%, #ffd01b 35%, #eda300 71%, #ffbd0a 100%);
    box-shadow: 0 0 0 0.789cqw #ffb600,
        0 0 0 1.42cqw #fff27a,
        0 0 0 1.946cqw rgba(142, 73, 0, 0.96),
        0 6px 0 #b47b00,
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 1.052cqw 1.157cqw rgba(255, 255, 255, 0.9),
        inset 0 -1.315cqw 1.473cqw rgba(130, 64, 0, 0.47);
    color: #593000;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    user-select: none;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gold-medallion::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 6.55%;
    border: 1cqw solid #874900;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 53%, #ffffd8 0%, #fffdbb 30%, #fff38a 63%, #ffdc45 100%);
    box-shadow: 0 0 0 0.631cqw #ffc10e,
        0 0 0 1.315cqw #ffdc47,
        inset 0 1.315cqw 1.999cqw rgba(255, 255, 255, 0.9),
        inset 0 -1.157cqw 1.578cqw rgba(212, 137, 0, 0.24),
        0 0.579cqw 0.631cqw rgba(93, 43, 0, 0.32);
}

.gold-medallion::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 23%;
    right: 23%;
    top: 9.5%;
    height: 7%;
    border-radius: 50%;
    background: rgba(255, 255, 220, 0.68);
    filter: blur(0.631cqw);
}

.gold-medallion__label {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: block;
    width: 100%;
    color: #593000;
    font-size: 22.881cqw;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    -webkit-text-stroke: 0.132cqw #3b1e00;
    text-shadow: 0 0.473cqw 0 rgba(255, 230, 101, 0.95),
        0 0.947cqw 0.526cqw rgba(112, 56, 0, 0.3);
    transform: translate(-50%, -47%);
}

.gold-medallion__label--archive {
    font-size: 20cqw;
}

.gold-medallion__label--phone {
    font-size: 15.8cqw;
}

.gold-medallion:hover {
    transform: translateY(-4px);
    filter: brightness(1.025) saturate(1.02);
    box-shadow: 0 0 0 0.789cqw #ffb600,
        0 0 0 1.42cqw #fff27a,
        0 0 0 1.946cqw rgba(142, 73, 0, 0.96),
        0 10px 0 #b47b00,
        0 16px 30px rgba(0, 0, 0, 0.4),
        inset 0 1.052cqw 1.157cqw rgba(255, 255, 255, 0.9),
        inset 0 -1.315cqw 1.473cqw rgba(130, 64, 0, 0.47);
}

.gold-medallion:active {
    transform: scale(0.992);
}

.gold-medallion:focus-visible {
    outline: 1.052cqw solid #6a3900;
    outline-offset: 1.473cqw;
}

@media (prefers-reduced-motion: no-preference) {
    .gold-medallion {
        transition: filter 130ms ease, transform 90ms ease;
    }
}

.phonebook-gold-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #b47b00, 0 6px 12px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.9), inset 0 -2px 2px rgba(152,78,0,0.62);
}

.notes-gold-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #b47b00, 0 6px 12px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.9), inset 0 -2px 2px rgba(152,78,0,0.62);
}

.add-phone-gold-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #b47b00, 0 6px 12px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.9), inset 0 -2px 2px rgba(152,78,0,0.62);
}
.option-yes,
.option-no {
    opacity: 0.35;
    transition: opacity 0.2s, border 0.2s;
}

.usage-card {
    background: #ffffff;
    border: 1px solid #E8D5B5;
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(78,52,46,0.05);
}

.usage-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    color: #4E342E;
    background: #FDF8F0;
    border-radius: 12px 12px 0 0;
}

.usage-card-body {
    padding: 12px 15px;
    display: none;
}

.usage-card.open .usage-card-body {
    display: block;
}

.usage-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid #f0ebe4;
}

.usage-option-row:last-child {
    border-bottom: none;
}

.usage-option-label {
    flex: 1;
    font-size: 0.95rem;
    color: #3E2723;
}

.usage-radio-group {
    display: flex;
    gap: 5px;
}

.usage-radio-group label {
    margin: 0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    background: #F5F0E8;
    color: #6D4C41;
    transition: all 0.2s;
}

.usage-radio-group input {
    display: none;
}

.usage-radio-group input:checked + span {
    background: #C9A96E;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
}

.ptype-selector-box {
    border: 2px solid #D7CCC8;
    border-radius: 12px;
    background: #FAFAFA;
    cursor: pointer;
    padding: 12px 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.ptype-selector-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    color: #4E342E;
}

.ptype-selector-dropdown {
    display: none;
    margin-top: 10px;
    padding: 8px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #E8D5B5;
}

.ptype-selector-dropdown.open {
    display: block;
}

.ptype-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid #f0ebe4;
}

.ptype-item:last-child {
    border-bottom: none;
}

.ptype-item-name {
    font-weight: bold;
    color: #3E2723;
}

.ptype-actions {
    display: flex;
    gap: 5px;
}

.ptype-btn {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    background: #F5F0E8;
    color: #6D4C41;
}

.ptype-btn input {
    display: inline-block;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #27ae60;
}

.ptype-btn input:checked + span {
    background: #C9A96E;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
}
.ptype-btn {
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    cursor: pointer;
    background: #F5F0E8;
    color: #6D4C41;
    margin: 0 !important;
}

.ptype-btn input {
    display: inline-block;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #27ae60;
}

.ptype-btn input:checked + span {
    background: #C9A96E;
    color: white;
    padding: 4px 10px !important;
    border-radius: 20px;
    display: inline-block;
}
.usage-radio-group input:checked + span {
    background: #27ae60 !important;
    color: white !important;
    padding: 4px 10px;
    border-radius: 20px;
}

.ptype-btn input:checked + span {
    background: #27ae60 !important;
    color: white !important;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.ptype-selector-dropdown {
    max-height: 320px;
    overflow-y: auto;
}

.ptype-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #f0ebe4;
}

.ptype-item-name {
    flex: 1 0 80px;
    text-align: right;
    font-weight: bold;
    color: #3E2723;
}

.ptype-actions {
    display: flex;
    gap: 5px;
    margin-right: auto;
}

.ptype-btn {
    min-width: 90px;
    text-align: center;
}
.ptype-btn input[value="primary"]:checked + span {
    background: #27ae60 !important;
    color: white !important;
}

.ptype-btn input[value="acceptable"]:checked + span {
    background: #3498db !important;
    color: white !important;
}

.ptype-btn input[value="none"]:checked + span {
    background: #e74c3c !important;
    color: white !important;
}

.ptype-btn {
    display: inline-block;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.ptype-btn span {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border-radius: 10px;
    text-align: center;
    background: #F5F0E8;
    color: #4E342E;
}

.ptype-btn input {
    display: inline-block;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #27ae60;
}

.ptype-btn input[value="primary"]:checked + span {
    background: #27ae60;
    color: white;
    box-shadow: 0 4px 0 #1e8449;
    transform: translateY(-2px);
}

.ptype-btn input[value="acceptable"]:checked + span {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 0 #2471a3;
    transform: translateY(-2px);
}

.ptype-btn input[value="none"]:checked + span {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 0 #c0392b;
    transform: translateY(-2px);
}
/* جلوگیری از اسکرول افقی */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* اجازه بده کادرها کوچیک بشن */
.home-buttons,
.gold-rail-container,
.medallions-row,
.medallion-shell,
.medallion-shell > div {
    min-width: 0;
}

/* تنظیم برای صفحه‌های کوچیک */
@media (max-width: 420px) {
    .medallions-row {
        gap: 4px !important;
        padding: 0 4px !important;
    }
    
    .medallions-row > div {
        max-width: 75px !important;
    }
    
    .medallions-row span {
        font-size: 0.95rem !important;
    }
    
    .gold-rail-container {
        margin-top: -8px !important;
    }
}
/* ========== صفحه‌بندی ========== */
.pagination-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(78,52,46,0.1);
    border: 1px solid #E8D5B5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.pagination-info {
    color: #4E342E;
    font-weight: bold;
    font-size: 0.95rem;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.pagination-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #F5F0E8;
    color: #4E342E;
    border: 2px solid #E8D5B5;
    border-radius: 10px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.page-btn:hover:not(.page-active) {
    background: #C9A96E;
    color: white;
    border-color: #C9A96E;
    transform: translateY(-2px);
}

.page-active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #1a5276;
    box-shadow: 0 3px 0 #1a5276;
    cursor: default;
}

.page-nav {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
    border-color: #145a32;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 40px;
    color: #8D6E63;
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .pagination-wrapper {
        padding: 12px;
        gap: 10px;
    }
    .pagination-info {
        font-size: 0.85rem;
    }
    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
    .pagination-buttons {
        gap: 4px;
    }
}
/* ========== حالت نمایش کارت/جدول ========== */
.sale-cards-mobile {
    display: none;
}

/* حالت خودکار - موبایل: کارت */
@media (max-width: 768px) {
    body.view-auto .sale-table-desktop {
        display: none !important;
    }
    body.view-auto .sale-cards-mobile {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
    }
}

/* حالت جدول (اجباری) */
body.view-table .sale-cards-mobile {
    display: none !important;
}
body.view-table .sale-table-desktop {
    display: block !important;
}

/* حالت کارت (اجباری) */
body.view-card .sale-cards-mobile {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}
body.view-card .sale-table-desktop {
    display: none !important;
}

/* کارت‌ها روی دسکتاپ چندستونه */
@media (min-width: 769px) {
    body.view-card .sale-cards-mobile {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

/* ========== کارت‌های جدید ========== */
.sale-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(78,52,46,0.12);
    border: 1px solid #E8D5B5;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sale-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78,52,46,0.18);
}

.sale-card-header {
    padding: 10px 12px;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sale-card-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sale-card-type {
    font-weight: 900;
    font-size: 0.95rem;
    color: #1a1a1a;
}

.sale-card-usage {
    font-size: 0.75rem;
    font-weight: bold;
    opacity: 0.75;
    margin-right: 3px;
}

.sale-card-code {
    background: rgba(255,255,255,0.6);
    color: #1a1a1a;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.sale-card-header-date {
    font-size: 0.8rem;
    color: #1a1a1a;
    font-weight: bold;
}

.sale-card-price-section {
    padding: 10px 12px;
    background: linear-gradient(135deg, #FDF8F0, #F5EDE0);
    border-bottom: 1px solid #EFEBE9;
    text-align: right;
}

.sale-card-price-label {
    color: #8D6E63;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.sale-card-price-value {
    color: #1a1a1a;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.sale-card-price-meter {
    color: #666;
    font-size: 0.75rem;
    margin-top: 3px;
    font-weight: bold;
    text-align: center;
}

.sale-card-info-grid {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sale-card-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #F8F8FF;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #E8E8F0;
    font-size: 0.8rem;
}

.sale-card-info-icon {
    font-size: 0.9rem;
}

.sale-card-info-text {
    color: #1a1a5e;
    font-weight: bold;
    font-size: 0.8rem;
}

.sale-card-address {
    padding: 0 12px 8px 12px;
    color: #555;
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sale-card-owner {
    padding: 12px 14px;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFEFD5 100%);
    border-top: 2px solid #C9A96E;
    border-bottom: 2px solid #C9A96E;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sale-card-owner-name {
    color: #e74c3c;
    font-weight: 900;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sale-card-actions {
    padding: 8px 12px 12px 12px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.sale-card-phone {
    color: #1a5276;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    direction: ltr;
    display: inline-block;
}

.sale-card-phone:active {
    opacity: 0.7;
}

.sale-card-btn-more {
    flex: 1;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #1a5276;
    transition: all 0.15s ease;
}

.sale-card-btn-more:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #1a5276;
}

.sale-card-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #C9A96E;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 3px 0 #8B6914;
    transition: all 0.15s ease;
}

.sale-card-btn-edit:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #8B6914;
}

.sale-card-menu-container {
    position: relative;
}

.sale-card-btn-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #95a5a6;
    color: white;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #7f8c8d;
    transition: all 0.15s ease;
    line-height: 1;
}

.sale-card-btn-menu:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #7f8c8d;
}

.sale-card-menu {
    display: none;
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    padding: 8px;
    min-width: 170px;
    z-index: 999999;
    border: 2px solid #E8D5B5;
    max-height: 80vh;
    overflow-y: auto;
}

.sale-card-menu.open {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sale-card-menu form {
    display: block;
    width: 100%;
}

.sale-card-menu-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: all 0.15s ease;
}

.sale-card-menu-btn.btn-sold {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 3px 0 #145a32;
}

.sale-card-menu-btn.btn-sold:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #145a32;
}

.sale-card-menu-btn.btn-cancel {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    box-shadow: 0 3px 0 #5d6d6e;
}

.sale-card-menu-btn.btn-cancel:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #5d6d6e;
}

.sale-card-menu-btn.btn-delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 3px 0 #922b21;
}

.sale-card-menu-btn.btn-delete:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #922b21;
}
/* افکت سه‌بعدی برای ۴ مدال تکی پایین */
.medallion-shell {
    transition: transform 0.15s ease, filter 0.15s ease;
    cursor: pointer;
}

.medallion-shell:hover {
    transform: translateY(-4px);
    filter: brightness(1.05);
}

.medallion-shell:active {
    transform: translateY(5px) scale(0.92);
    filter: brightness(0.85);
}
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ━━━ Visibility Selector (خصوصی/عمومی) — Professional ━━━ */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.visibility-selector {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 18px;
    border-radius: 12px;
    border-right: 4px solid #2196F3;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.visibility-selector-title {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c3e50;
}

.visibility-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.visibility-option {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.visibility-option:hover {
    border-color: #2196F3;
    background: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33,150,243,0.15);
}

.visibility-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.visibility-radio-circle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2.5px solid #adb5bd;
    background: #ffffff;
    display: inline-block;
    transition: all 0.2s ease;
    position: relative;
}

.visibility-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2196F3;
    transition: transform 0.2s ease;
}

.visibility-option input[type="radio"]:checked ~ .visibility-radio-circle {
    border-color: #2196F3;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.15);
}

.visibility-option input[type="radio"]:checked ~ .visibility-radio-circle::after {
    transform: translate(-50%, -50%) scale(1);
}

.visibility-option input[type="radio"]:checked ~ .visibility-radio-label {
    color: #2196F3;
    font-weight: 800;
}

.visibility-option:has(input[type="radio"]:checked) {
    border-color: #2196F3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 4px 12px rgba(33,150,243,0.2);
}

.visibility-radio-label {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.visibility-radio-label small {
    font-weight: 400;
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 2px;
}

.visibility-option input[type="radio"]:checked ~ .visibility-radio-label small {
    color: #1976d2;
}

/* ━━━ Responsive (موبایل) ━━━ */
@media (max-width: 500px) {
    .visibility-options {
        flex-direction: column;
        gap: 8px;
    }
    .visibility-option {
        min-width: 100%;
        padding: 10px 14px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */


/* ═══════════════════════════════════════════════════════════════ */
/* ━━━ fix V10.44: Page Transitions (Fade) ━━━ */
/* ═══════════════════════════════════════════════════════════════ */

/* ━━━ fix V10.64: فقط Fade-in (بدون Fade-out) ━━━ */
html {
    background: #F5F0E8;
    min-height: 100vh;
}

body {
    opacity: 0;
    animation: pageFadeIn 0.08s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.page-loaded {
    opacity: 1;
}

/* ━━━ page-leaving دیگه اعمال نمیشه — navigate فوریه ━━━ */

/* ━━━ fix V10.50: مچینگ — بدون انیمیشن ━━━ */
body.no-transition {
    opacity: 1 !important;
    transition: none !important;
    animation: none !important;
}

/* ━━━ بهبود حس نرم ━━━ */
html {
    scroll-behavior: smooth;
}

/* ━━━ احترام به prefers-reduced-motion ━━━ */
@media (prefers-reduced-motion: reduce) {
    body {
        opacity: 1 !important;
        animation: none !important;
    }
    body.page-leaving {
        opacity: 1 !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto !important;
    }
}

/* ━━━ Element hover transitions برای حس نرم‌تر ━━━ */
a, button, .btn {
    transition: opacity 0.15s ease, transform 0.1s ease;
}

a:active, button:active, .btn:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* ━━━ fix V10.45: Card Animations (Desktop + Mobile) ━━━ */
/* ═══════════════════════════════════════════════════════════════ */

/* ━━━ کارت‌های اصلی: sale-card، card، matching-card ━━━ */
.sale-card,
.detail-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.25s ease-out,
                border-color 0.25s ease-out;
}

/* ━━━ نوار طلایی که از راست میاد (وارد سمت راست) ━━━ */
.sale-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FFD700, #C9A96E);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.25s ease-out;
    z-index: 10;
    pointer-events: none;
}

/* ═══════════════════════════════════════════ */
/* 🖥️ Desktop (hover-capable) — hover animation */
/* ═══════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
    .sale-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 16px 35px rgba(78, 52, 46, 0.22);
        border-color: #C9A96E;
    }
    
    .sale-card:hover::before {
        transform: scaleY(1);
    }
}

/* ═══════════════════════════════════════════ */
/* 📱 Mobile (touch) — tap/press animation */
/* ═══════════════════════════════════════════ */
@media (hover: none), (pointer: coarse) {
    /* ━━━ کارت‌ها همیشه نوار طلایی داشته باشن (خیلی نازک) ━━━ */
    .sale-card::before {
        width: 3px;
        background: linear-gradient(180deg, rgba(255,215,0,0.5), rgba(201,169,110,0.4));
        transform: scaleY(1);
    }
    
    /* ━━━ فشردن: کمی کوچک‌تر ━━━ */
    .sale-card:active {
        transform: scale(0.975);
        box-shadow: 0 4px 12px rgba(78, 52, 46, 0.15);
        transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
    }
    
    /* ━━━ Tap effect (touch start) ━━━ */
    .sale-card.touch-press {
        transform: scale(0.975);
        box-shadow: 0 4px 12px rgba(78, 52, 46, 0.15);
    }
}

/* ━━━ احترام به prefers-reduced-motion ━━━ */
@media (prefers-reduced-motion: reduce) {
    .sale-card,
    .detail-card {
        transition: none !important;
    }
    .sale-card:hover,
    .sale-card:active {
        transform: none !important;
    }
    .sale-card::before {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* ━━━ fix V10.46: Dark theme — فقط label های filter-section ━━━ */
/* ═══════════════════════════════════════════════════════════════ */

/* ━━━ label های داخل filter-section (باز شده) ━━━ */
body.dark-theme .filter-section .filter-label,
body.dark-theme .filter-section .range-title,
body.dark-theme .filter-section .range-word,
body.dark-theme .filter-section label {
    color: #FFF8E7;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ━━━ input/select داخل filter-section (خوانایی بهتر) ━━━ */
body.dark-theme .filter-section input,
body.dark-theme .filter-section select {
    background: #FFFFFF;
    color: #1F1F1F;
    border-color: #C9A96E;
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* ━━━ fix V10.46d: utility-row (بایگانی/تلفن/یادداشت/طراح) ━━━ */
/* ═══════════════════════════════════════════════════════════════ */

body.dark-theme .utility-row span,
body.dark-theme .utility-row a span,
body.dark-theme .utility-row > div span {
    color: #FFFFFF !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

/* ━━━ دکمه تنظیمات (profile) — پس‌زمینه تیره + متن سفید ━━━ */
body.dark-theme .utility-row a[href="/profile"] {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #FFFFFF !important;
}

body.dark-theme .utility-row a[href="/profile"] span {
    color: #FFFFFF !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

body.dark-theme .utility-row a[href="/profile"] img {
    filter: brightness(0) invert(1);
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* ━━━ fix V10.46h: Dark theme — مدال‌ها + تنظیمات ━━━ */
/* ═══════════════════════════════════════════════════════════════ */

/* ━━━ ۴ مدال: بایگانی، تلفن، یادداشت، طراح ━━━ */
body.dark-theme .medallions-row > div > span {
    color: #FFFFFF !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* ━━━ دکمه تنظیمات ━━━ */
body.dark-theme .utility-row a[href="/profile"] {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #FFFFFF !important;
}

body.dark-theme .utility-row a[href="/profile"] span {
    color: #FFFFFF !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════ */
