/* ==============================================================================
 * START.AI PROPERTY MATCHING MODULE - CLIENT STYLESHEET
 * Version: 01.00.00
 * ============================================================================== */

.startai-property-matching {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.spm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.spm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spm-badge-version {
    font-size: 0.75rem;
    background: #0d9488;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.spm-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

/* Stats */
.spm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spm-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.spm-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.spm-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.25rem;
}

/* Tabs */
.spm-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.spm-tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}

.spm-tab-btn.active {
    color: #0d9488;
    border-bottom-color: #0d9488;
}

.spm-tab-btn:hover {
    color: #0f766e;
}

/* Filters */
.spm-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.spm-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.spm-flex-grow {
    flex: 1 1 250px;
}

.spm-filter-group {
    display: flex;
    flex-direction: column;
}

.spm-filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.spm-align-end {
    flex-direction: row;
    gap: 0.5rem;
}

.spm-input, .spm-select {
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s ease;
}

.spm-input:focus, .spm-select:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

/* Buttons */
.spm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.spm-btn-primary {
    background: #0d9488;
    color: #ffffff;
}

.spm-btn-primary:hover {
    background: #0f766e;
}

.spm-btn-secondary {
    background: #334155;
    color: #ffffff;
}

.spm-btn-secondary:hover {
    background: #1e293b;
}

/* Table */
.spm-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1.25rem;
}

.spm-table-responsive {
    overflow-x: auto;
}

.spm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.spm-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.spm-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.spm-table tr:hover {
    background-color: #f8fafc;
}

/* Score Bar */
.spm-score-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spm-score-bar-bg {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.spm-score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    border-radius: 4px;
}

.spm-score-text {
    font-weight: 700;
    font-size: 0.85rem;
    color: #0f766e;
    min-width: 45px;
}

/* Tags */
.spm-tag {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.spm-tag-match { background: #dcfce7; color: #166534; }
.spm-tag-unmatch { background: #fee2e2; color: #991b1b; }
.spm-tag-mode { background: #e0f2fe; color: #0369a1; }
