/* StartAi.PropertyTag Module Styles */
.spt-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.spt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.spt-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spt-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.spt-icon {
    font-size: 28px;
}

.spt-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.spt-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    vertical-align: middle;
}

.spt-actions {
    display: flex;
    gap: 10px;
}

.spt-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.spt-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spt-tab:hover {
    color: #0f172a;
}

.spt-tab-active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
}

.spt-tab-content {
    display: none;
}

.spt-tab-content-active {
    display: block;
}

.spt-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.spt-input, .spt-select, .spt-textarea {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.spt-input:focus, .spt-select:focus, .spt-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.spt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.spt-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.spt-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.spt-btn-primary:hover {
    background: #1d4ed8;
}

.spt-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.spt-btn-secondary:hover {
    background: #e2e8f0;
}

.spt-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.spt-btn-danger:hover {
    background: #fecaca;
}

.spt-btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

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

.spt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.spt-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.spt-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.spt-table tr:hover td {
    background: #f8fafc;
}

.spt-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
}

.spt-tag-pill .spt-tag-remove {
    cursor: pointer;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.spt-tag-pill .spt-tag-remove:hover {
    background: rgba(0,0,0,0.4);
}

.spt-scope-system {
    color: #0369a1;
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.spt-scope-portal {
    color: #059669;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.spt-visibility-public {
    color: #15803d;
    font-size: 12px;
}

.spt-visibility-private {
    color: #b45309;
    font-size: 12px;
}

.spt-status-active {
    color: #16a34a;
    font-weight: 600;
}

.spt-status-inactive {
    color: #94a3b8;
}

.spt-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.spt-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spt-add-tags-box {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
}

.spt-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.spt-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.spt-autocomplete-item:hover {
    background: #f1f5f9;
}

.spt-tag-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
}

.spt-tag-check-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.spt-tag-check-item:hover {
    background: #f8fafc;
}

.spt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.spt-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spt-stat-title {
    font-size: 13px;
    font-weight: 600;
}

.spt-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

/* Modals */
.spt-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spt-modal-content {
    background: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.spt-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.spt-close-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
}

.spt-close-btn:hover {
    color: #0f172a;
}

.spt-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.spt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.spt-form-group {
    margin-bottom: 14px;
}

.spt-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.spt-req {
    color: #ef4444;
}

.spt-form-row {
    display: flex;
    gap: 10px;
}

.spt-text-center { text-align: center; }
.spt-text-muted { color: #94a3b8; font-size: 12px; }
.spt-text-danger { color: #ef4444; }
