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

.startai-property-demand {
    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);
}

.spd-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

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

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

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

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

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

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

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

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

.spd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.spd-flex-grow {
    flex: 1 1 300px;
}

.spd-input, .spd-select, .spd-textarea {
    width: 100%;
    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;
}

.spd-input:focus, .spd-select:focus, .spd-textarea:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Buttons */
.spd-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;
}

.spd-btn-primary {
    background: #0284c7;
    color: #ffffff;
}

.spd-btn-primary:hover {
    background: #0369a1;
}

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

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

.spd-btn-outline {
    background: transparent;
    border-color: #cbd5e1;
    color: #475569;
}

.spd-btn-outline:hover {
    background: #f1f5f9;
}

.spd-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

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

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

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

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

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

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

/* Badges */
.spd-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.spd-badge-buy { background: #dbeafe; color: #1e40af; }
.spd-badge-sell { background: #dcfce7; color: #15803d; }
.spd-badge-rent { background: #fef3c7; color: #b45309; }
.spd-badge-lease { background: #fae8ff; color: #86198f; }

.spd-badge-active { background: #e0f2fe; color: #0369a1; }
.spd-badge-assigned { background: #ede9fe; color: #6d28d9; }
.spd-badge-in-progress { background: #fef08a; color: #854d0e; }
.spd-badge-matched { background: #bbf7d0; color: #166534; }
.spd-badge-closed { background: #f1f5f9; color: #475569; }
.spd-badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Modals */
.spd-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.spd-modal-dialog {
    background: #ffffff;
    border-radius: 8px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.spd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.spd-modal-title {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.spd-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
}

.spd-modal-body {
    padding: 1.25rem;
}

.spd-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.spd-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.spd-form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.spd-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.spd-req {
    color: #ef4444;
}

.spd-toast-container {
    margin-bottom: 1rem;
}
