/* Market Intelligence Dashboard — Brand Orange Theme (#ff6725), prefix: mi- */

.mi-search-hero {
    background: linear-gradient(135deg, #ff6725 0%, #ff8f5c 50%, #ffb88c 100%);
    padding: 32px 28px 22px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}
.mi-search-hero-decoration {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.mi-search-hero-decoration::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.mi-search-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.mi-search-hero-badge i { margin-right: 5px; }
.mi-search-hero-title {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}
.mi-search-hero-desc {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0;
}
.mi-search-hero-desc a {
    color: #ffd4c2;
    text-decoration: underline;
    font-weight: 500;
}
.mi-search-hero-desc a:hover { color: #fff; text-decoration: none; }
.mi-search-hero + .mi-content-card { border-radius: 0 0 20px 20px !important; }
.mi-content-card { padding: 24px; }

/* Stat cards row */
.mi-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.mi-stat-card {
    background: #fff8f4;
    border: 1px solid #ffe0d0;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.mi-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,103,37,0.10);
}
.mi-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
    background: linear-gradient(135deg, #ff6725, #ff8f5c);
    color: #fff;
}
.mi-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #e55a1b;
    margin-bottom: 4px;
}
.mi-stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Section titles */
.mi-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}
.mi-section-title i {
    color: #ff6725;
    margin-right: 8px;
}

/* Charts */
.mi-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.mi-chart-card {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 20px;
}
.mi-chart-card h5 {
    font-size: 15px;
    font-weight: 700;
    color: #444;
    margin-bottom: 14px;
    text-align: center;
}
.mi-chart-wrap {
    position: relative;
    height: 300px;
}

/* Data tables */
.mi-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mi-data-table thead th {
    background: #fff5f0;
    color: #333;
    font-weight: 700;
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #ffe0d0;
    white-space: nowrap;
}
.mi-data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    vertical-align: middle;
}
.mi-data-table tbody tr:hover {
    background: #fff9f6;
}
.mi-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sortable headers */
.mi-sortable-th {
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    user-select: none;
}
.mi-sortable-th:hover {
    background: #ffede4 !important;
}
.mi-sortable-th i {
    font-size: 10px;
    color: #bbb;
    margin-left: 4px;
}

/* District link */
.mi-district-link {
    color: #e55a1b;
    font-weight: 600;
    text-decoration: none;
}
.mi-district-link:hover {
    color: #ff6725;
    text-decoration: underline;
}

/* Rank badges */
.mi-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.mi-rank-gold { background: linear-gradient(135deg, #f9a825, #ff8f00); }
.mi-rank-orange { background: #ff6725; }
.mi-rank-gray { background: #999; }
.mi-rank-green { background: #43a047; }

/* Classification badges */
.mi-class-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}
.mi-class-residential {
    background: #fff3ed;
    color: #e55a1b;
    border: 1px solid #ffd4c2;
}
.mi-class-commercial {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.mi-class-other {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

/* Results actions */
.mi-results-actions .btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
}

/* FAQ */
.mi-faq-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}
.mi-faq-item.open { border-color: #ff6725; }
.mi-faq-question {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    background: #fafafa;
}
.mi-faq-question i { transition: transform 0.3s; color: #ff6725; }
.mi-faq-item.open .mi-faq-question i { transform: rotate(180deg); }
.mi-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}
.mi-faq-item.open .mi-faq-answer {
    padding: 0 20px 16px;
    max-height: 500px;
}

/* SEO article section */
#tool-article h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ff6725;
    margin-bottom: 16px;
    line-height: 1.3;
}
#tool-article h3 {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin: 24px 0 10px;
    line-height: 1.4;
}
#tool-article p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}
#tool-article ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 16px;
}
#tool-article ul li {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    padding: 4px 0;
}
#tool-article a {
    color: #ff6725;
    text-decoration: none;
    font-weight: 500;
}
#tool-article a:hover { text-decoration: underline; }

/* Related tool cards */
.related-tools-heading {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}
.related-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.related-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,103,37,0.12);
    border-color: #ffb88c;
    text-decoration: none;
    color: #333;
}
.related-tool-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff3ed 0%, #ffd6c2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #e55a1b;
}
.related-tool-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #333;
}
.related-tool-info p {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.4;
}
.related-tool-arrow {
    margin-left: auto;
    color: #ccc;
    font-size: 12px;
}

/* Print */
@media print {
    .dashboard-side-menu, .dashboard-header, .mi-search-hero,
    .related-tool-card, #tool-article, .mi-faq-item, footer, nav, .breadcrumb,
    .mi-results-actions, .mi-chart-row, #mi-district-select { display: none !important; }
    .mi-data-table { font-size: 11px; }
    .mi-data-table thead th { background: #f5f5f5 !important; }
    .mi-data-table tbody tr { page-break-inside: avoid; }
    .mi-content-card { border-radius: 0 !important; }
    #mi-district-table::before {
        content: 'Market Intelligence Dashboard — Source: tg.verified.realestate';
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #ddd;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mi-search-hero-title { font-size: 20px; }
    .mi-stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mi-stat-card { padding: 16px 12px; }
    .mi-stat-value { font-size: 22px; }
    .mi-chart-row { grid-template-columns: 1fr; gap: 16px; }
    .mi-chart-wrap { height: 250px; }
    .mi-data-table { font-size: 12px; }
    .mi-data-table thead th, .mi-data-table tbody td { padding: 8px 10px; }
    .mi-section-title { font-size: 16px; }
}
@media (max-width: 576px) {
    .mi-stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .mi-search-hero { padding: 22px 18px 16px; }
    .mi-search-hero-title { font-size: 18px; }
    .mi-chart-wrap { height: 220px; }
    .mi-data-table thead th, .mi-data-table tbody td { padding: 6px 8px; font-size: 11px; }
    .mi-rank { width: 24px; height: 24px; font-size: 10px; }
}
